package androidx.appcompat.view.menu; import android.R; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import o.C0683McA; import o.NoP; import o.Sya; /* loaded from: classes.dex */ public final class ExpandedMenuView extends ListView implements NoP.LWm, Sya, AdapterView.OnItemClickListener { private static final int[] c = {R.attr.background, R.attr.divider}; private NoP e; public ExpandedMenuView(Context context, AttributeSet attributeSet) { this(context, attributeSet, R.attr.listViewStyle); } public ExpandedMenuView(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet); setOnItemClickListener(this); C0683McA c0683McA = new C0683McA(context, context.obtainStyledAttributes(attributeSet, c, i, 0)); if (c0683McA.d.hasValue(0)) { setBackgroundDrawable(c0683McA.jL_(0)); } if (c0683McA.d.hasValue(1)) { setDivider(c0683McA.jL_(1)); } c0683McA.d.recycle(); } @Override // android.widget.ListView, android.widget.AbsListView, android.widget.AdapterView, android.view.ViewGroup, android.view.View protected final void onDetachedFromWindow() { super.onDetachedFromWindow(); setChildrenDrawingCacheEnabled(false); } @Override // android.widget.AdapterView.OnItemClickListener public final void onItemClick(AdapterView adapterView, View view, int i, long j) { this.e.eM_((MenuItemImpl) getAdapter().getItem(i), null, 0); } @Override // o.NoP.LWm public final boolean d(MenuItemImpl menuItemImpl) { return this.e.eM_(menuItemImpl, null, 0); } @Override // o.Sya public final void a(NoP noP) { this.e = noP; } }