MaterialRadioButton.smali
.class public Lcom/google/android/material/radiobutton/MaterialRadioButton;
.super Landroidx/appcompat/widget/AppCompatRadioButton;
.source "MaterialRadioButton.java"
# static fields
.field private static final DEF_STYLE_RES:I
.field private static final ENABLED_CHECKED_STATES:[[I
# instance fields
.field private materialThemeColorsTintList:Landroid/content/res/ColorStateList;
.field private useMaterialThemeColors:Z
# direct methods
.method static constructor <clinit>()V
.registers 4
.line 45
sget v0, Lcom/google/android/material/R$style;->Widget_MaterialComponents_CompoundButton_RadioButton:I
sput v0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->DEF_STYLE_RES:I
const/4 v0, 0x4
new-array v0, v0, [[I
const/4 v1, 0x2
new-array v2, v1, [I
.line 47
fill-array-data v2, :array_2a
const/4 v3, 0x0
aput-object v2, v0, v3
new-array v2, v1, [I
fill-array-data v2, :array_32
const/4 v3, 0x1
aput-object v2, v0, v3
new-array v2, v1, [I
fill-array-data v2, :array_3a
aput-object v2, v0, v1
new-array v1, v1, [I
fill-array-data v1, :array_42
const/4 v2, 0x3
aput-object v1, v0, v2
sput-object v0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->ENABLED_CHECKED_STATES:[[I
return-void
:array_2a
.array-data 4
0x101009e
0x10100a0
.end array-data
:array_32
.array-data 4
0x101009e
-0x10100a0
.end array-data
:array_3a
.array-data 4
-0x101009e
0x10100a0
.end array-data
:array_42
.array-data 4
-0x101009e
-0x10100a0
.end array-data
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
const/4 v0, 0x0
.line 58
invoke-direct {p0, p1, v0}, Lcom/google/android/material/radiobutton/MaterialRadioButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 4
.line 62
sget v0, Lcom/google/android/material/R$attr;->radioButtonStyle:I
invoke-direct {p0, p1, p2, v0}, Lcom/google/android/material/radiobutton/MaterialRadioButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.registers 11
.line 67
sget v4, Lcom/google/android/material/radiobutton/MaterialRadioButton;->DEF_STYLE_RES:I
invoke-static {p1, p2, p3, v4}, Lcom/google/android/material/theme/overlay/MaterialThemeOverlay;->wrap(Landroid/content/Context;Landroid/util/AttributeSet;II)Landroid/content/Context;
move-result-object p1
invoke-direct {p0, p1, p2, p3}, Landroidx/appcompat/widget/AppCompatRadioButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 69
invoke-virtual {p0}, Lcom/google/android/material/radiobutton/MaterialRadioButton;->getContext()Landroid/content/Context;
move-result-object p1
.line 71
sget-object v2, Lcom/google/android/material/R$styleable;->MaterialRadioButton:[I
const/4 v6, 0x0
new-array v5, v6, [I
move-object v0, p1
move-object v1, p2
move v3, p3
.line 72
invoke-static/range {v0 .. v5}, Lcom/google/android/material/internal/ThemeEnforcement;->obtainStyledAttributes(Landroid/content/Context;Landroid/util/AttributeSet;[III[I)Landroid/content/res/TypedArray;
move-result-object p2
.line 77
sget p3, Lcom/google/android/material/R$styleable;->MaterialRadioButton_buttonTint:I
invoke-virtual {p2, p3}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result p3
if-eqz p3, :cond_2a
.line 78
sget p3, Lcom/google/android/material/R$styleable;->MaterialRadioButton_buttonTint:I
.line 80
invoke-static {p1, p2, p3}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
move-result-object p1
.line 78
invoke-static {p0, p1}, Landroidx/core/widget/CompoundButtonCompat;->setButtonTintList(Landroid/widget/CompoundButton;Landroid/content/res/ColorStateList;)V
.line 84
:cond_2a
sget p1, Lcom/google/android/material/R$styleable;->MaterialRadioButton_useMaterialThemeColors:I
.line 85
invoke-virtual {p2, p1, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result p1
iput-boolean p1, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->useMaterialThemeColors:Z
.line 87
invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V
return-void
.end method
.method private getMaterialThemeColorsTintList()Landroid/content/res/ColorStateList;
.registers 8
.line 119
iget-object v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->materialThemeColorsTintList:Landroid/content/res/ColorStateList;
if-nez v0, :cond_46
.line 120
sget v0, Lcom/google/android/material/R$attr;->colorControlActivated:I
invoke-static {p0, v0}, Lcom/google/android/material/color/MaterialColors;->getColor(Landroid/view/View;I)I
move-result v0
.line 121
sget v1, Lcom/google/android/material/R$attr;->colorOnSurface:I
invoke-static {p0, v1}, Lcom/google/android/material/color/MaterialColors;->getColor(Landroid/view/View;I)I
move-result v1
.line 122
sget v2, Lcom/google/android/material/R$attr;->colorSurface:I
invoke-static {p0, v2}, Lcom/google/android/material/color/MaterialColors;->getColor(Landroid/view/View;I)I
move-result v2
.line 124
sget-object v3, Lcom/google/android/material/radiobutton/MaterialRadioButton;->ENABLED_CHECKED_STATES:[[I
array-length v4, v3
new-array v4, v4, [I
const/4 v5, 0x0
const/high16 v6, 0x3f800000 # 1.0f
.line 126
invoke-static {v2, v0, v6}, Lcom/google/android/material/color/MaterialColors;->layer(IIF)I
move-result v0
aput v0, v4, v5
const/4 v0, 0x1
const v5, 0x3f0a3d71 # 0.54f
.line 128
invoke-static {v2, v1, v5}, Lcom/google/android/material/color/MaterialColors;->layer(IIF)I
move-result v5
aput v5, v4, v0
const/4 v0, 0x2
const v5, 0x3ec28f5c # 0.38f
.line 130
invoke-static {v2, v1, v5}, Lcom/google/android/material/color/MaterialColors;->layer(IIF)I
move-result v6
aput v6, v4, v0
const/4 v0, 0x3
.line 132
invoke-static {v2, v1, v5}, Lcom/google/android/material/color/MaterialColors;->layer(IIF)I
move-result v1
aput v1, v4, v0
.line 133
new-instance v0, Landroid/content/res/ColorStateList;
invoke-direct {v0, v3, v4}, Landroid/content/res/ColorStateList;-><init>([[I[I)V
iput-object v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->materialThemeColorsTintList:Landroid/content/res/ColorStateList;
.line 136
:cond_46
iget-object v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->materialThemeColorsTintList:Landroid/content/res/ColorStateList;
return-object v0
.end method
# virtual methods
.method public isUseMaterialThemeColors()Z
.registers 2
.line 115
iget-boolean v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->useMaterialThemeColors:Z
return v0
.end method
.method protected onAttachedToWindow()V
.registers 2
.line 92
invoke-super {p0}, Landroidx/appcompat/widget/AppCompatRadioButton;->onAttachedToWindow()V
.line 94
iget-boolean v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->useMaterialThemeColors:Z
if-eqz v0, :cond_11
invoke-static {p0}, Landroidx/core/widget/CompoundButtonCompat;->getButtonTintList(Landroid/widget/CompoundButton;)Landroid/content/res/ColorStateList;
move-result-object v0
if-nez v0, :cond_11
const/4 v0, 0x1
.line 95
invoke-virtual {p0, v0}, Lcom/google/android/material/radiobutton/MaterialRadioButton;->setUseMaterialThemeColors(Z)V
:cond_11
return-void
.end method
.method public setUseMaterialThemeColors(Z)V
.registers 2
.line 105
iput-boolean p1, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->useMaterialThemeColors:Z
if-eqz p1, :cond_c
.line 107
invoke-direct {p0}, Lcom/google/android/material/radiobutton/MaterialRadioButton;->getMaterialThemeColorsTintList()Landroid/content/res/ColorStateList;
move-result-object p1
invoke-static {p0, p1}, Landroidx/core/widget/CompoundButtonCompat;->setButtonTintList(Landroid/widget/CompoundButton;Landroid/content/res/ColorStateList;)V
goto :goto_10
:cond_c
const/4 p1, 0x0
.line 109
invoke-static {p0, p1}, Landroidx/core/widget/CompoundButtonCompat;->setButtonTintList(Landroid/widget/CompoundButton;Landroid/content/res/ColorStateList;)V
:goto_10
return-void
.end method