what-the-bank/sources/com/google/android/material/navigation/NavigationBarItemView.java

849 lines
32 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.material.navigation;
import android.R;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.view.menu.MenuItemImpl;
import androidx.core.view.ViewCompat;
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import o.C0459HUs;
import o.C0912RjT;
import o.C17052tZT;
import o.C5745byp;
import o.C6217cMa;
import o.C6286cOZ;
import o.C6759cbV;
import o.DAZ;
import o.Sya;
import o.Tlu;
import o.nMh;
/* loaded from: classes2.dex */
public abstract class NavigationBarItemView extends FrameLayout implements Sya.HBt {
private static final IeS f;
private static final int[] h = {R.attr.state_checked};
private static final IeS i;
private final TextView A;
private Drawable B;
private float C;
private float D;
private float G;
private Drawable H;
private final TextView I;
C5745byp a;
IeS b;
final View c;
float d;
final ImageView e;
MenuItemImpl g;
boolean j;
private int k;
private ValueAnimator l;
private int m;
private int n;
/* renamed from: o, reason: collision with root package name */
private boolean f6477o;
private Drawable p;
private boolean q;
private ColorStateList r;
private boolean s;
private final FrameLayout t;
private int u;
private final ViewGroup v;
private ColorStateList w;
private int x;
private int y;
private int z;
@Override // o.Sya.HBt
public final boolean b() {
return false;
}
protected abstract int c();
public void setShortcut(boolean z, char c) {
}
static {
byte b = 0;
i = new IeS(b);
f = new HBt(b);
}
public NavigationBarItemView(Context context) {
super(context);
this.j = false;
this.y = -1;
this.b = i;
this.d = BitmapDescriptorFactory.HUE_RED;
this.f6477o = false;
this.n = 0;
this.m = 0;
this.q = false;
this.k = 0;
LayoutInflater.from(context).inflate(c(), (ViewGroup) this, true);
this.t = (FrameLayout) findViewById(C17052tZT.ZqN.navigation_bar_item_icon_container);
this.c = findViewById(C17052tZT.ZqN.navigation_bar_item_active_indicator_view);
ImageView imageView = (ImageView) findViewById(C17052tZT.ZqN.navigation_bar_item_icon_view);
this.e = imageView;
ViewGroup viewGroup = (ViewGroup) findViewById(C17052tZT.ZqN.navigation_bar_item_labels_group);
this.v = viewGroup;
TextView textView = (TextView) findViewById(C17052tZT.ZqN.navigation_bar_item_small_label_view);
this.I = textView;
TextView textView2 = (TextView) findViewById(C17052tZT.ZqN.navigation_bar_item_large_label_view);
this.A = textView2;
setBackgroundResource(C17052tZT.LWm.mtrl_navigation_bar_item_background);
this.u = getResources().getDimensionPixelSize(d());
this.x = viewGroup.getPaddingBottom();
ViewCompat.g(textView, 2);
ViewCompat.g(textView2, 2);
setFocusable(true);
float textSize = textView.getTextSize();
float textSize2 = textView2.getTextSize();
this.G = textSize - textSize2;
this.D = textSize2 / textSize;
this.C = textSize / textSize2;
if (imageView != null) {
imageView.addOnLayoutChangeListener(new View.OnLayoutChangeListener(this) { // from class: com.google.android.material.navigation.NavigationBarItemView.1
private NavigationBarItemView e;
{
this.e = this;
}
@Override // android.view.View.OnLayoutChangeListener
public final void onLayoutChange(View view, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9) {
if (this.e.e.getVisibility() == 0) {
NavigationBarItemView navigationBarItemView = this.e;
ImageView imageView2 = navigationBarItemView.e;
if (navigationBarItemView.a != null) {
C5745byp c5745byp = navigationBarItemView.a;
ImageView imageView3 = navigationBarItemView.e;
Rect rect = new Rect();
imageView2.getDrawingRect(rect);
c5745byp.setBounds(rect);
c5745byp.HZ_(imageView2, null);
}
}
}
});
}
}
@Override // android.view.View
protected int getSuggestedMinimumWidth() {
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.v.getLayoutParams();
int i2 = ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin;
int measuredWidth = this.v.getMeasuredWidth();
int i3 = ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin;
C5745byp c5745byp = this.a;
int minimumWidth = c5745byp == null ? 0 : c5745byp.getMinimumWidth() - this.a.b.h.s.intValue();
View view = this.t;
if (view == null) {
view = this.e;
}
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) view.getLayoutParams();
return Math.max(Math.max(minimumWidth, ((ViewGroup.MarginLayoutParams) layoutParams2).leftMargin) + this.e.getMeasuredWidth() + Math.max(minimumWidth, ((ViewGroup.MarginLayoutParams) layoutParams2).rightMargin), i2 + measuredWidth + i3);
}
@Override // android.view.View
protected int getSuggestedMinimumHeight() {
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.v.getLayoutParams();
C5745byp c5745byp = this.a;
int minimumHeight = c5745byp != null ? c5745byp.getMinimumHeight() / 2 : 0;
View view = this.t;
if (view == null) {
view = this.e;
}
return Math.max(minimumHeight, ((ViewGroup.MarginLayoutParams) ((FrameLayout.LayoutParams) view.getLayoutParams())).topMargin) + this.e.getMeasuredWidth() + minimumHeight + ((ViewGroup.MarginLayoutParams) layoutParams).topMargin + this.v.getMeasuredHeight() + ((ViewGroup.MarginLayoutParams) layoutParams).bottomMargin;
}
@Override // o.Sya.HBt
public final void c(MenuItemImpl menuItemImpl) {
CharSequence title;
this.g = menuItemImpl;
setCheckable(menuItemImpl.isCheckable());
setChecked(menuItemImpl.isChecked());
setEnabled(menuItemImpl.isEnabled());
setIcon(menuItemImpl.getIcon());
setTitle(menuItemImpl.getTitle());
setId(menuItemImpl.getItemId());
if (!TextUtils.isEmpty(menuItemImpl.getContentDescription())) {
setContentDescription(menuItemImpl.getContentDescription());
}
if (!TextUtils.isEmpty(menuItemImpl.getTooltipText())) {
title = menuItemImpl.getTooltipText();
} else {
title = menuItemImpl.getTitle();
}
C6286cOZ.e(this, title);
setVisibility(menuItemImpl.isVisible() ? 0 : 8);
this.j = true;
}
public void setShifting(boolean z) {
if (this.s != z) {
this.s = z;
MenuItemImpl menuItemImpl = this.g;
if (menuItemImpl != null) {
setChecked(menuItemImpl.isChecked());
}
}
}
public void setTitle(CharSequence charSequence) {
this.I.setText(charSequence);
this.A.setText(charSequence);
MenuItemImpl menuItemImpl = this.g;
if (menuItemImpl == null || TextUtils.isEmpty(menuItemImpl.getContentDescription())) {
setContentDescription(charSequence);
}
MenuItemImpl menuItemImpl2 = this.g;
if (menuItemImpl2 != null && !TextUtils.isEmpty(menuItemImpl2.getTooltipText())) {
charSequence = this.g.getTooltipText();
}
C6286cOZ.e(this, charSequence);
}
public void setCheckable(boolean z) {
refreshDrawableState();
}
@Override // android.view.View
protected void onSizeChanged(int i2, int i3, int i4, int i5) {
super.onSizeChanged(i2, i3, i4, i5);
post(new Runnable(this, i2) { // from class: com.google.android.material.navigation.NavigationBarItemView.4
private int b;
private NavigationBarItemView e;
{
this.e = this;
this.b = i2;
}
@Override // java.lang.Runnable
public final void run() {
this.e.b(this.b);
}
});
}
public void setChecked(boolean z) {
this.A.setPivotX(r0.getWidth() / 2);
this.A.setPivotY(r0.getBaseline());
this.I.setPivotX(r0.getWidth() / 2);
this.I.setPivotY(r0.getBaseline());
float f2 = z ? 1.0f : BitmapDescriptorFactory.HUE_RED;
if (!this.f6477o || !this.j || !ViewCompat.H(this)) {
View view = this.c;
if (view != null) {
this.b.a(f2, f2, view);
}
this.d = f2;
} else {
ValueAnimator valueAnimator = this.l;
if (valueAnimator != null) {
valueAnimator.cancel();
this.l = null;
}
ValueAnimator ofFloat = ValueAnimator.ofFloat(this.d, f2);
this.l = ofFloat;
ofFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(this, f2) { // from class: com.google.android.material.navigation.NavigationBarItemView.3
private NavigationBarItemView a;
private float c;
{
this.a = this;
this.c = f2;
}
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator2) {
float floatValue = ((Float) valueAnimator2.getAnimatedValue()).floatValue();
NavigationBarItemView navigationBarItemView = this.a;
float f3 = this.c;
View view2 = navigationBarItemView.c;
if (view2 != null) {
navigationBarItemView.b.a(floatValue, f3, view2);
}
navigationBarItemView.d = floatValue;
}
});
this.l.setInterpolator(DAZ.Kh_(getContext(), C17052tZT.IeS.motionEasingEmphasizedInterpolator, C6217cMa.d));
this.l.setDuration(DAZ.a(getContext(), C17052tZT.IeS.motionDurationLong2, getResources().getInteger(C17052tZT.saX.material_motion_duration_long_1)));
this.l.start();
}
int i2 = this.z;
if (i2 != -1) {
if (i2 == 0) {
if (z) {
View view2 = this.t;
if (view2 == null) {
view2 = this.e;
}
int i3 = this.u;
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) view2.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams).topMargin = i3;
((ViewGroup.MarginLayoutParams) layoutParams).bottomMargin = i3;
layoutParams.gravity = 49;
view2.setLayoutParams(layoutParams);
ViewGroup viewGroup = this.v;
viewGroup.setPadding(viewGroup.getPaddingLeft(), viewGroup.getPaddingTop(), viewGroup.getPaddingRight(), this.x);
this.A.setVisibility(0);
} else {
View view3 = this.t;
if (view3 == null) {
view3 = this.e;
}
int i4 = this.u;
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) view3.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams2).topMargin = i4;
((ViewGroup.MarginLayoutParams) layoutParams2).bottomMargin = i4;
layoutParams2.gravity = 17;
view3.setLayoutParams(layoutParams2);
ViewGroup viewGroup2 = this.v;
viewGroup2.setPadding(viewGroup2.getPaddingLeft(), viewGroup2.getPaddingTop(), viewGroup2.getPaddingRight(), 0);
this.A.setVisibility(4);
}
this.I.setVisibility(4);
} else if (i2 == 1) {
ViewGroup viewGroup3 = this.v;
viewGroup3.setPadding(viewGroup3.getPaddingLeft(), viewGroup3.getPaddingTop(), viewGroup3.getPaddingRight(), this.x);
if (z) {
View view4 = this.t;
if (view4 == null) {
view4 = this.e;
}
int i5 = (int) (this.u + this.G);
FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) view4.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams3).topMargin = i5;
((ViewGroup.MarginLayoutParams) layoutParams3).bottomMargin = i5;
layoutParams3.gravity = 49;
view4.setLayoutParams(layoutParams3);
TextView textView = this.A;
textView.setScaleX(1.0f);
textView.setScaleY(1.0f);
textView.setVisibility(0);
TextView textView2 = this.I;
float f3 = this.D;
textView2.setScaleX(f3);
textView2.setScaleY(f3);
textView2.setVisibility(4);
} else {
View view5 = this.t;
if (view5 == null) {
view5 = this.e;
}
int i6 = this.u;
FrameLayout.LayoutParams layoutParams4 = (FrameLayout.LayoutParams) view5.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams4).topMargin = i6;
((ViewGroup.MarginLayoutParams) layoutParams4).bottomMargin = i6;
layoutParams4.gravity = 49;
view5.setLayoutParams(layoutParams4);
TextView textView3 = this.A;
float f4 = this.C;
textView3.setScaleX(f4);
textView3.setScaleY(f4);
textView3.setVisibility(4);
TextView textView4 = this.I;
textView4.setScaleX(1.0f);
textView4.setScaleY(1.0f);
textView4.setVisibility(0);
}
} else if (i2 == 2) {
View view6 = this.t;
if (view6 == null) {
view6 = this.e;
}
int i7 = this.u;
FrameLayout.LayoutParams layoutParams5 = (FrameLayout.LayoutParams) view6.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams5).topMargin = i7;
((ViewGroup.MarginLayoutParams) layoutParams5).bottomMargin = i7;
layoutParams5.gravity = 17;
view6.setLayoutParams(layoutParams5);
this.A.setVisibility(8);
this.I.setVisibility(8);
}
} else if (this.s) {
if (z) {
View view7 = this.t;
if (view7 == null) {
view7 = this.e;
}
int i8 = this.u;
FrameLayout.LayoutParams layoutParams6 = (FrameLayout.LayoutParams) view7.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams6).topMargin = i8;
((ViewGroup.MarginLayoutParams) layoutParams6).bottomMargin = i8;
layoutParams6.gravity = 49;
view7.setLayoutParams(layoutParams6);
ViewGroup viewGroup4 = this.v;
viewGroup4.setPadding(viewGroup4.getPaddingLeft(), viewGroup4.getPaddingTop(), viewGroup4.getPaddingRight(), this.x);
this.A.setVisibility(0);
} else {
View view8 = this.t;
if (view8 == null) {
view8 = this.e;
}
int i9 = this.u;
FrameLayout.LayoutParams layoutParams7 = (FrameLayout.LayoutParams) view8.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams7).topMargin = i9;
((ViewGroup.MarginLayoutParams) layoutParams7).bottomMargin = i9;
layoutParams7.gravity = 17;
view8.setLayoutParams(layoutParams7);
ViewGroup viewGroup5 = this.v;
viewGroup5.setPadding(viewGroup5.getPaddingLeft(), viewGroup5.getPaddingTop(), viewGroup5.getPaddingRight(), 0);
this.A.setVisibility(4);
}
this.I.setVisibility(4);
} else {
ViewGroup viewGroup6 = this.v;
viewGroup6.setPadding(viewGroup6.getPaddingLeft(), viewGroup6.getPaddingTop(), viewGroup6.getPaddingRight(), this.x);
if (z) {
View view9 = this.t;
if (view9 == null) {
view9 = this.e;
}
int i10 = (int) (this.u + this.G);
FrameLayout.LayoutParams layoutParams8 = (FrameLayout.LayoutParams) view9.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams8).topMargin = i10;
((ViewGroup.MarginLayoutParams) layoutParams8).bottomMargin = i10;
layoutParams8.gravity = 49;
view9.setLayoutParams(layoutParams8);
TextView textView5 = this.A;
textView5.setScaleX(1.0f);
textView5.setScaleY(1.0f);
textView5.setVisibility(0);
TextView textView6 = this.I;
float f5 = this.D;
textView6.setScaleX(f5);
textView6.setScaleY(f5);
textView6.setVisibility(4);
} else {
View view10 = this.t;
if (view10 == null) {
view10 = this.e;
}
int i11 = this.u;
FrameLayout.LayoutParams layoutParams9 = (FrameLayout.LayoutParams) view10.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams9).topMargin = i11;
((ViewGroup.MarginLayoutParams) layoutParams9).bottomMargin = i11;
layoutParams9.gravity = 49;
view10.setLayoutParams(layoutParams9);
TextView textView7 = this.A;
float f6 = this.C;
textView7.setScaleX(f6);
textView7.setScaleY(f6);
textView7.setVisibility(4);
TextView textView8 = this.I;
textView8.setScaleX(1.0f);
textView8.setScaleY(1.0f);
textView8.setVisibility(0);
}
}
refreshDrawableState();
setSelected(z);
}
@Override // android.view.View
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
C5745byp c5745byp = this.a;
if (c5745byp != null && c5745byp.isVisible()) {
CharSequence title = this.g.getTitle();
if (!TextUtils.isEmpty(this.g.getContentDescription())) {
title = this.g.getContentDescription();
}
StringBuilder sb = new StringBuilder();
sb.append((Object) title);
sb.append(", ");
sb.append((Object) this.a.b());
accessibilityNodeInfo.setContentDescription(sb.toString());
}
AccessibilityNodeInfoCompat tU_ = AccessibilityNodeInfoCompat.tU_(accessibilityNodeInfo);
ViewGroup viewGroup = (ViewGroup) getParent();
int indexOfChild = viewGroup.indexOfChild(this);
int i2 = 0;
for (int i3 = 0; i3 < indexOfChild; i3++) {
View childAt = viewGroup.getChildAt(i3);
if ((childAt instanceof NavigationBarItemView) && childAt.getVisibility() == 0) {
i2++;
}
}
tU_.d(AccessibilityNodeInfoCompat.CollectionItemInfoCompat.c(0, 1, i2, 1, false, isSelected()));
if (isSelected()) {
tU_.d(false);
tU_.a(AccessibilityNodeInfoCompat.AccessibilityActionCompat.e);
}
tU_.j(getResources().getString(C17052tZT.ojQ.item_view_role_description));
}
@Override // android.view.View
public void setEnabled(boolean z) {
super.setEnabled(z);
this.I.setEnabled(z);
this.A.setEnabled(z);
this.e.setEnabled(z);
if (z) {
ViewCompat.d(this, C0912RjT.a(getContext(), 1002));
} else {
ViewCompat.d(this, (C0912RjT) null);
}
}
@Override // android.view.ViewGroup, android.view.View
public int[] onCreateDrawableState(int i2) {
int[] onCreateDrawableState = super.onCreateDrawableState(i2 + 1);
MenuItemImpl menuItemImpl = this.g;
if (menuItemImpl != null && menuItemImpl.isCheckable() && this.g.isChecked()) {
mergeDrawableStates(onCreateDrawableState, h);
}
return onCreateDrawableState;
}
public void setIcon(Drawable drawable) {
if (drawable == this.B) {
return;
}
this.B = drawable;
if (drawable != null) {
Drawable.ConstantState constantState = drawable.getConstantState();
if (constantState != null) {
drawable = constantState.newDrawable();
}
drawable = Tlu.pI_(drawable).mutate();
this.H = drawable;
ColorStateList colorStateList = this.r;
if (colorStateList != null) {
Tlu.pF_(drawable, colorStateList);
}
}
this.e.setImageDrawable(drawable);
}
public void setIconTintList(ColorStateList colorStateList) {
Drawable drawable;
this.r = colorStateList;
if (this.g == null || (drawable = this.H) == null) {
return;
}
Tlu.pF_(drawable, colorStateList);
this.H.invalidateSelf();
}
public void setIconSize(int i2) {
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.e.getLayoutParams();
((ViewGroup.LayoutParams) layoutParams).width = i2;
((ViewGroup.LayoutParams) layoutParams).height = i2;
this.e.setLayoutParams(layoutParams);
}
public void setTextAppearanceInactive(int i2) {
Ki_(this.I, i2);
float textSize = this.I.getTextSize();
float textSize2 = this.A.getTextSize();
this.G = textSize - textSize2;
this.D = textSize2 / textSize;
this.C = textSize / textSize2;
}
public void setTextAppearanceActive(int i2) {
Ki_(this.A, i2);
float textSize = this.I.getTextSize();
float textSize2 = this.A.getTextSize();
this.G = textSize - textSize2;
this.D = textSize2 / textSize;
this.C = textSize / textSize2;
TextView textView = this.A;
textView.setTypeface(textView.getTypeface(), 1);
}
/* JADX WARN: Removed duplicated region for block: B:5:0x0050 */
/* JADX WARN: Removed duplicated region for block: B:8:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static void Ki_(android.widget.TextView r4, int r5) {
/*
o.URz.we_(r4, r5)
android.content.Context r0 = r4.getContext()
r1 = 0
if (r5 != 0) goto Lc
La:
r5 = r1
goto L4e
Lc:
int[] r2 = o.C17052tZT.jNh.TextAppearance
android.content.res.TypedArray r5 = r0.obtainStyledAttributes(r5, r2)
android.util.TypedValue r2 = new android.util.TypedValue
r2.<init>()
int r3 = o.C17052tZT.jNh.TextAppearance_android_textSize
boolean r3 = r5.getValue(r3, r2)
r5.recycle()
if (r3 != 0) goto L23
goto La
L23:
int r5 = r2.getComplexUnit()
r3 = 2
if (r5 != r3) goto L40
int r5 = r2.data
float r5 = android.util.TypedValue.complexToFloat(r5)
android.content.res.Resources r0 = r0.getResources()
android.util.DisplayMetrics r0 = r0.getDisplayMetrics()
float r0 = r0.density
float r5 = r5 * r0
int r5 = java.lang.Math.round(r5)
goto L4e
L40:
int r5 = r2.data
android.content.res.Resources r0 = r0.getResources()
android.util.DisplayMetrics r0 = r0.getDisplayMetrics()
int r5 = android.util.TypedValue.complexToDimensionPixelSize(r5, r0)
L4e:
if (r5 == 0) goto L54
float r5 = (float) r5
r4.setTextSize(r1, r5)
L54:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.material.navigation.NavigationBarItemView.Ki_(android.widget.TextView, int):void");
}
public void setTextColor(ColorStateList colorStateList) {
if (colorStateList != null) {
this.I.setTextColor(colorStateList);
this.A.setTextColor(colorStateList);
}
}
public void setItemBackground(int i2) {
setItemBackground(i2 == 0 ? null : nMh.getDrawable(getContext(), i2));
}
public void setItemBackground(Drawable drawable) {
if (drawable != null && drawable.getConstantState() != null) {
drawable = drawable.getConstantState().newDrawable().mutate();
}
this.p = drawable;
e();
}
public void setItemRippleColor(ColorStateList colorStateList) {
this.w = colorStateList;
e();
}
private void e() {
Drawable drawable = this.p;
RippleDrawable rippleDrawable = null;
boolean z = true;
if (this.w != null) {
View view = this.c;
Drawable background = view == null ? null : view.getBackground();
if (this.f6477o) {
View view2 = this.c;
if ((view2 == null ? null : view2.getBackground()) != null && this.t != null && background != null) {
z = false;
rippleDrawable = new RippleDrawable(C0459HUs.KI_(this.w), null, background);
}
}
if (drawable == null) {
drawable = new RippleDrawable(C0459HUs.KG_(this.w), null, null);
}
}
FrameLayout frameLayout = this.t;
if (frameLayout != null) {
ViewCompat.sn_(frameLayout, rippleDrawable);
}
ViewCompat.sn_(this, drawable);
setDefaultFocusHighlightEnabled(z);
}
public void setItemPaddingTop(int i2) {
if (this.u != i2) {
this.u = i2;
MenuItemImpl menuItemImpl = this.g;
if (menuItemImpl != null) {
setChecked(menuItemImpl.isChecked());
}
}
}
public void setItemPaddingBottom(int i2) {
if (this.x != i2) {
this.x = i2;
MenuItemImpl menuItemImpl = this.g;
if (menuItemImpl != null) {
setChecked(menuItemImpl.isChecked());
}
}
}
public void setActiveIndicatorEnabled(boolean z) {
this.f6477o = z;
e();
View view = this.c;
if (view != null) {
view.setVisibility(z ? 0 : 8);
requestLayout();
}
}
public void setActiveIndicatorWidth(int i2) {
this.n = i2;
b(getWidth());
}
final void b(int i2) {
if (this.c == null) {
return;
}
int min = Math.min(this.n, i2 - (this.k << 1));
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.c.getLayoutParams();
((ViewGroup.LayoutParams) layoutParams).height = (this.q && this.z == 2) ? min : this.m;
((ViewGroup.LayoutParams) layoutParams).width = min;
this.c.setLayoutParams(layoutParams);
}
public void setActiveIndicatorHeight(int i2) {
this.m = i2;
b(getWidth());
}
public void setActiveIndicatorMarginHorizontal(int i2) {
this.k = i2;
b(getWidth());
}
public void setActiveIndicatorDrawable(Drawable drawable) {
View view = this.c;
if (view == null) {
return;
}
view.setBackgroundDrawable(drawable);
e();
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchTouchEvent(MotionEvent motionEvent) {
FrameLayout frameLayout = this.t;
if (frameLayout != null && this.f6477o) {
frameLayout.dispatchTouchEvent(motionEvent);
}
return super.dispatchTouchEvent(motionEvent);
}
public final void b(C5745byp c5745byp) {
ImageView imageView;
C5745byp c5745byp2 = this.a;
if (c5745byp2 == c5745byp) {
return;
}
if (c5745byp2 != null && (imageView = this.e) != null) {
a(imageView);
}
this.a = c5745byp;
ImageView imageView2 = this.e;
if (imageView2 == null || c5745byp == null || imageView2 == null) {
return;
}
setClipChildren(false);
setClipToPadding(false);
C6759cbV.e(this.a, imageView2);
}
protected int d() {
return C17052tZT.HBt.mtrl_navigation_bar_item_default_margin;
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public static class IeS {
protected float d(float f) {
return 1.0f;
}
private IeS() {
}
/* synthetic */ IeS(byte b) {
this();
}
public final void a(float f, float f2, View view) {
view.setScaleX((0.6f * f) + 0.4f);
view.setScaleY(d(f));
view.setAlpha(C6217cMa.b(BitmapDescriptorFactory.HUE_RED, 1.0f, f2 == BitmapDescriptorFactory.HUE_RED ? 0.8f : 0.0f, f2 == BitmapDescriptorFactory.HUE_RED ? 1.0f : 0.2f, f));
}
}
/* loaded from: classes2.dex */
static class HBt extends IeS {
@Override // com.google.android.material.navigation.NavigationBarItemView.IeS
protected final float d(float f) {
return (f * 0.6f) + 0.4f;
}
private HBt() {
super((byte) 0);
}
/* synthetic */ HBt(byte b) {
this();
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public final void a(View view) {
if (this.a != null) {
if (view != null) {
setClipChildren(true);
setClipToPadding(true);
C6759cbV.d(this.a, view);
}
this.a = null;
}
}
public void setLabelVisibilityMode(int i2) {
if (this.z != i2) {
this.z = i2;
this.b = (this.q && i2 == 2) ? f : i;
b(getWidth());
MenuItemImpl menuItemImpl = this.g;
if (menuItemImpl != null) {
setChecked(menuItemImpl.isChecked());
}
}
}
public void setItemPosition(int i2) {
this.y = i2;
}
public void setActiveIndicatorResizeable(boolean z) {
this.q = z;
}
@Override // o.Sya.HBt
public final MenuItemImpl a() {
return this.g;
}
}