package com.google.android.material.bottomnavigation; import android.content.Context; import android.util.AttributeSet; import android.view.View; import androidx.core.view.ViewCompat; import androidx.core.view.WindowInsetsCompat; import com.google.android.material.navigation.NavigationBarMenuView; import com.google.android.material.navigation.NavigationBarView; import o.C0683McA; import o.C17052tZT; import o.Lot; import o.uqW; /* loaded from: classes2.dex */ public class BottomNavigationView extends NavigationBarView { @Deprecated /* loaded from: classes2.dex */ public interface IeS extends NavigationBarView.HBt { } @Deprecated /* loaded from: classes2.dex */ public interface LWm extends NavigationBarView.RVV { } @Override // com.google.android.material.navigation.NavigationBarView public final int c() { return 5; } public BottomNavigationView(Context context) { this(context, null); } public BottomNavigationView(Context context, AttributeSet attributeSet) { this(context, attributeSet, C17052tZT.IeS.bottomNavigationStyle); } public BottomNavigationView(Context context, AttributeSet attributeSet, int i) { this(context, attributeSet, i, C17052tZT.NHB.Widget_Design_BottomNavigationView); } private BottomNavigationView(Context context, AttributeSet attributeSet, int i, int i2) { super(context, attributeSet, i, i2); Context context2 = getContext(); int[] iArr = C17052tZT.jNh.BottomNavigationView; uqW.Kb_(context2, attributeSet, i, i2); uqW.Kc_(context2, attributeSet, iArr, i, i2, new int[0]); C0683McA c0683McA = new C0683McA(context2, context2.obtainStyledAttributes(attributeSet, iArr, i, i2)); setItemHorizontalTranslationEnabled(c0683McA.d.getBoolean(C17052tZT.jNh.BottomNavigationView_itemHorizontalTranslationEnabled, true)); if (c0683McA.d.hasValue(C17052tZT.jNh.BottomNavigationView_android_minHeight)) { setMinimumHeight(c0683McA.d.getDimensionPixelSize(C17052tZT.jNh.BottomNavigationView_android_minHeight, 0)); } c0683McA.d.getBoolean(C17052tZT.jNh.BottomNavigationView_compatShadowEnabled, true); c0683McA.d.recycle(); Lot.c(this, new Lot.IeS(this) { // from class: com.google.android.material.bottomnavigation.BottomNavigationView.1 private BottomNavigationView b; { this.b = this; } @Override // o.Lot.IeS public final WindowInsetsCompat b(View view, WindowInsetsCompat windowInsetsCompat, Lot.RVV rvv) { rvv.d += windowInsetsCompat.f(); boolean z = ViewCompat.m(view) == 1; int g = windowInsetsCompat.g(); int j = windowInsetsCompat.j(); rvv.a += z ? j : g; int i3 = rvv.c; if (!z) { g = j; } rvv.c = i3 + g; rvv.a(view); return windowInsetsCompat; } }); } @Override // com.google.android.material.navigation.NavigationBarView public final NavigationBarMenuView d(Context context) { return new BottomNavigationMenuView(context); } @Deprecated public void setOnNavigationItemSelectedListener(LWm lWm) { setOnItemSelectedListener(lWm); } @Deprecated public void setOnNavigationItemReselectedListener(IeS ieS) { setOnItemReselectedListener(ieS); } @Override // android.widget.FrameLayout, android.view.View protected void onMeasure(int i, int i2) { int suggestedMinimumHeight = getSuggestedMinimumHeight(); if (View.MeasureSpec.getMode(i2) != 1073741824 && suggestedMinimumHeight > 0) { i2 = View.MeasureSpec.makeMeasureSpec(Math.min(View.MeasureSpec.getSize(i2), suggestedMinimumHeight + getPaddingTop() + getPaddingBottom()), 1073741824); } super.onMeasure(i, i2); } public void setItemHorizontalTranslationEnabled(boolean z) { BottomNavigationMenuView bottomNavigationMenuView = (BottomNavigationMenuView) this.e; if (bottomNavigationMenuView.a != z) { bottomNavigationMenuView.setItemHorizontalTranslationEnabled(z); e().a(false); } } }