what-the-bank/sources/o/WpL.java

112 lines
3.3 KiB
Java

package o;
import android.content.Context;
import android.graphics.Rect;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.HeaderViewListAdapter;
import android.widget.ListAdapter;
import android.widget.PopupWindow;
import androidx.appcompat.view.menu.MenuItemImpl;
/* loaded from: classes.dex */
public abstract class WpL implements AZJ, InterfaceC15933jjG, AdapterView.OnItemClickListener {
Rect h;
@Override // o.InterfaceC15933jjG
public final int a() {
return 0;
}
@Override // o.InterfaceC15933jjG
public final void a(Context context, NoP noP) {
}
public abstract void a(View view);
public abstract void b(int i);
public abstract void b(NoP noP);
public abstract void c(int i);
public abstract void c(boolean z);
protected boolean c() {
return true;
}
@Override // o.InterfaceC15933jjG
public final boolean c(MenuItemImpl menuItemImpl) {
return false;
}
@Override // o.InterfaceC15933jjG
public final boolean d(MenuItemImpl menuItemImpl) {
return false;
}
public abstract void e(int i);
public abstract void e(boolean z);
public abstract void fd_(PopupWindow.OnDismissListener onDismissListener);
@Override // android.widget.AdapterView.OnItemClickListener
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
C5263bpj c5263bpj;
ListAdapter listAdapter = (ListAdapter) adapterView.getAdapter();
if (listAdapter instanceof HeaderViewListAdapter) {
c5263bpj = (C5263bpj) ((HeaderViewListAdapter) listAdapter).getWrappedAdapter();
} else {
c5263bpj = (C5263bpj) listAdapter;
}
c5263bpj.d.eM_((MenuItem) listAdapter.getItem(i), this, c() ? 0 : 4);
}
/* JADX INFO: Access modifiers changed from: protected */
public static int eU_(ListAdapter listAdapter, Context context, int i) {
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(0, 0);
int makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(0, 0);
int count = listAdapter.getCount();
int i2 = 0;
int i3 = 0;
FrameLayout frameLayout = null;
View view = null;
for (int i4 = 0; i4 < count; i4++) {
int itemViewType = listAdapter.getItemViewType(i4);
if (itemViewType != i3) {
view = null;
i3 = itemViewType;
}
if (frameLayout == null) {
frameLayout = new FrameLayout(context);
}
view = listAdapter.getView(i4, view, frameLayout);
view.measure(makeMeasureSpec, makeMeasureSpec2);
int measuredWidth = view.getMeasuredWidth();
if (measuredWidth >= i) {
return i;
}
if (measuredWidth > i2) {
i2 = measuredWidth;
}
}
return i2;
}
/* JADX INFO: Access modifiers changed from: protected */
public static boolean e(NoP noP) {
int size = noP.size();
for (int i = 0; i < size; i++) {
MenuItem item = noP.getItem(i);
if (item.isVisible() && item.getIcon() != null) {
return true;
}
}
return false;
}
}