package androidx.appcompat.view.menu;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import androidx.appcompat.view.menu.C0103e;
import p028j.C1106g3;

/* loaded from: classes.dex */
public final class ExpandedMenuView extends ListView implements C0103e.InterfaceC0105b, InterfaceC0114j, AdapterView.OnItemClickListener {

    /* renamed from: f */
    public static final int[] f223f = {16842964, 16843049};

    /* renamed from: d */
    public C0103e f224d;

    /* renamed from: e */
    public int f225e;

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

    public ExpandedMenuView(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet);
        setOnItemClickListener(this);
        C1106g3 m2160u = C1106g3.m2160u(context, attributeSet, f223f, i, 0);
        if (m2160u.m2163r(0)) {
            setBackgroundDrawable(m2160u.m2175f(0));
        }
        if (m2160u.m2163r(1)) {
            setDivider(m2160u.m2175f(1));
        }
        m2160u.m2159v();
    }

    @Override // androidx.appcompat.view.menu.C0103e.InterfaceC0105b
    /* renamed from: a */
    public boolean mo4775a(C0107g c0107g) {
        return this.f224d.m4905L(c0107g, 0);
    }

    @Override // androidx.appcompat.view.menu.InterfaceC0114j
    /* renamed from: b */
    public void mo4774b(C0103e c0103e) {
        this.f224d = c0103e;
    }

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

    @Override // android.widget.ListView, android.widget.AbsListView, android.widget.AdapterView, android.view.ViewGroup, android.view.View
    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        setChildrenDrawingCacheEnabled(false);
    }

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