package androidx.appcompat.view.menu;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import ῲ.ῲ.ඓ.㳳.AbstractC1917;
import ῲ.ῲ.ඓ.㳳.C1912;
import ῲ.ῲ.ඓ.㳳.C1922;
import ῲ.ῲ.ῲ.K.C1940;

public final class ExpandedMenuView extends ListView implements C1912.AbstractC1913, AbstractC1917, AdapterView.OnItemClickListener {

    /* renamed from: 㸾  reason: contains not printable characters */
    public static final int[] f339 = {16842964, 16843049};

    /* renamed from: ʬ  reason: contains not printable characters */
    public int f340;

    /* renamed from: ῲ  reason: contains not printable characters */
    public C1912 f341;

    public ExpandedMenuView(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, 16842868);
    }

    public int getWindowAnimations() {
        return this.f340;
    }

    @Override // ῲ.ῲ.ඓ.㳳.AbstractC1917
    public void initialize(C1912 r1) {
        this.f341 = r1;
    }

    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        setChildrenDrawingCacheEnabled(false);
    }

    @Override // android.widget.AdapterView.OnItemClickListener
    public void onItemClick(AdapterView adapterView, View view, int i, long j) {
        m215((C1922) getAdapter().getItem(i));
    }

    @Override // ῲ.ῲ.ඓ.㳳.C1912.AbstractC1913
    /* renamed from: K  reason: contains not printable characters */
    public boolean m215(C1922 r3) {
        return this.f341.performItemAction(r3, 0);
    }

    public ExpandedMenuView(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet);
        Drawable drawable;
        int resourceId;
        Drawable drawable2;
        int resourceId2;
        setOnItemClickListener(this);
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, f339, i, 0);
        if (obtainStyledAttributes.hasValue(0)) {
            if (!obtainStyledAttributes.hasValue(0) || (resourceId2 = obtainStyledAttributes.getResourceId(0, 0)) == 0) {
                drawable2 = obtainStyledAttributes.getDrawable(0);
            } else {
                drawable2 = C1940.m5017(context, resourceId2);
            }
            setBackgroundDrawable(drawable2);
        }
        if (obtainStyledAttributes.hasValue(1)) {
            if (!obtainStyledAttributes.hasValue(1) || (resourceId = obtainStyledAttributes.getResourceId(1, 0)) == 0) {
                drawable = obtainStyledAttributes.getDrawable(1);
            } else {
                drawable = C1940.m5017(context, resourceId);
            }
            setDivider(drawable);
        }
        obtainStyledAttributes.recycle();
    }
}
