what-the-bank/sources/com/google/android/material/radiobutton/MaterialRadioButton.java

97 lines
3.9 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.material.radiobutton;
import android.R;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.util.AttributeSet;
import androidx.appcompat.widget.AppCompatRadioButton;
import o.C16021kYS;
import o.C16528pAJ;
import o.C17052tZT;
import o.Rez;
/* loaded from: classes2.dex */
public class MaterialRadioButton extends AppCompatRadioButton {
private static final int a = C17052tZT.NHB.Widget_MaterialComponents_CompoundButton_RadioButton;
private static final int[][] e = {new int[]{R.attr.state_enabled, R.attr.state_checked}, new int[]{R.attr.state_enabled, -16842912}, new int[]{-16842910, R.attr.state_checked}, new int[]{-16842910, -16842912}};
private ColorStateList b;
private boolean c;
public MaterialRadioButton(Context context) {
this(context, null);
}
public MaterialRadioButton(Context context, AttributeSet attributeSet) {
this(context, attributeSet, C17052tZT.IeS.radioButtonStyle);
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public MaterialRadioButton(android.content.Context r10, android.util.AttributeSet r11, int r12) {
/*
r9 = this;
int r6 = com.google.android.material.radiobutton.MaterialRadioButton.a
android.content.Context r10 = o.hdZ.MQ_(r10, r11, r12, r6)
r9.<init>(r10, r11, r12)
android.content.Context r10 = r9.getContext()
int[] r7 = o.C17052tZT.jNh.MaterialRadioButton
r8 = 0
int[] r5 = new int[r8]
o.uqW.Kb_(r10, r11, r12, r6)
r0 = r10
r1 = r11
r2 = r7
r3 = r12
r4 = r6
o.uqW.Kc_(r0, r1, r2, r3, r4, r5)
android.content.res.TypedArray r11 = r10.obtainStyledAttributes(r11, r7, r12, r6)
int r12 = o.C17052tZT.jNh.MaterialRadioButton_buttonTint
boolean r12 = r11.hasValue(r12)
if (r12 == 0) goto L32
int r12 = o.C17052tZT.jNh.MaterialRadioButton_buttonTint
android.content.res.ColorStateList r10 = o.C14739fyr.Ku_(r10, r11, r12)
o.C16528pAJ.vb_(r9, r10)
L32:
int r10 = o.C17052tZT.jNh.MaterialRadioButton_useMaterialThemeColors
boolean r10 = r11.getBoolean(r10, r8)
r9.c = r10
r11.recycle()
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.material.radiobutton.MaterialRadioButton.<init>(android.content.Context, android.util.AttributeSet, int):void");
}
@Override // android.widget.TextView, android.view.View
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if (this.c && C16528pAJ.uZ_(this) == null) {
setUseMaterialThemeColors(true);
}
}
public void setUseMaterialThemeColors(boolean z) {
this.c = z;
if (z) {
if (this.b == null) {
int d = C16021kYS.d(this, C17052tZT.IeS.colorControlActivated);
int d2 = C16021kYS.d(this, C17052tZT.IeS.colorOnSurface);
int d3 = C16021kYS.d(this, C17052tZT.IeS.colorSurface);
int[][] iArr = e;
int[] iArr2 = new int[iArr.length];
iArr2[0] = Rez.a(Rez.d(d, Math.round(Color.alpha(d))), d3);
iArr2[1] = Rez.a(Rez.d(d2, Math.round(Color.alpha(d2) * 0.54f)), d3);
iArr2[2] = Rez.a(Rez.d(d2, Math.round(Color.alpha(d2) * 0.38f)), d3);
iArr2[3] = Rez.a(Rez.d(d2, Math.round(Color.alpha(d2) * 0.38f)), d3);
this.b = new ColorStateList(iArr, iArr2);
}
C16528pAJ.vb_(this, this.b);
return;
}
C16528pAJ.vb_(this, null);
}
}