CheckableImageButton.smali
.class public Lcom/google/android/material/internal/CheckableImageButton;
.super Landroidx/appcompat/widget/AppCompatImageButton;
.source "CheckableImageButton.java"
# interfaces
.implements Landroid/widget/Checkable;
# static fields
.field private static final DRAWABLE_STATE_CHECKED:[I
# instance fields
.field private checked:Z
# direct methods
.method static constructor <clinit>()V
.registers 3
const/4 v0, 0x1
new-array v0, v0, [I
const/4 v1, 0x0
const v2, 0x10100a0
aput v2, v0, v1
.line 37
sput-object v0, Lcom/google/android/material/internal/CheckableImageButton;->DRAWABLE_STATE_CHECKED:[I
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
const/4 v0, 0x0
.line 42
invoke-direct {p0, p1, v0}, Lcom/google/android/material/internal/CheckableImageButton;-><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 46
sget v0, Landroidx/appcompat/R$attr;->imageButtonStyle:I
invoke-direct {p0, p1, p2, v0}, Lcom/google/android/material/internal/CheckableImageButton;-><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 4
.line 50
invoke-direct {p0, p1, p2, p3}, Landroidx/appcompat/widget/AppCompatImageButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 52
new-instance p1, Lcom/google/android/material/internal/CheckableImageButton$1;
invoke-direct {p1, p0}, Lcom/google/android/material/internal/CheckableImageButton$1;-><init>(Lcom/google/android/material/internal/CheckableImageButton;)V
invoke-static {p0, p1}, Landroidx/core/view/ViewCompat;->setAccessibilityDelegate(Landroid/view/View;Landroidx/core/view/AccessibilityDelegateCompat;)V
return-void
.end method
# virtual methods
.method public isChecked()Z
.registers 2
.line 82
iget-boolean v0, p0, Lcom/google/android/material/internal/CheckableImageButton;->checked:Z
return v0
.end method
.method public onCreateDrawableState(I)[I
.registers 3
.line 92
iget-boolean v0, p0, Lcom/google/android/material/internal/CheckableImageButton;->checked:Z
if-eqz v0, :cond_13
.line 93
sget-object v0, Lcom/google/android/material/internal/CheckableImageButton;->DRAWABLE_STATE_CHECKED:[I
array-length v0, v0
add-int/2addr p1, v0
.line 94
invoke-super {p0, p1}, Landroidx/appcompat/widget/AppCompatImageButton;->onCreateDrawableState(I)[I
move-result-object p1
sget-object v0, Lcom/google/android/material/internal/CheckableImageButton;->DRAWABLE_STATE_CHECKED:[I
.line 93
invoke-static {p1, v0}, Lcom/google/android/material/internal/CheckableImageButton;->mergeDrawableStates([I[I)[I
move-result-object p1
return-object p1
.line 97
:cond_13
invoke-super {p0, p1}, Landroidx/appcompat/widget/AppCompatImageButton;->onCreateDrawableState(I)[I
move-result-object p1
return-object p1
.end method
.method public setChecked(Z)V
.registers 3
.line 73
iget-boolean v0, p0, Lcom/google/android/material/internal/CheckableImageButton;->checked:Z
if-eq v0, p1, :cond_e
.line 74
iput-boolean p1, p0, Lcom/google/android/material/internal/CheckableImageButton;->checked:Z
.line 75
invoke-virtual {p0}, Lcom/google/android/material/internal/CheckableImageButton;->refreshDrawableState()V
const/16 p1, 0x800
.line 76
invoke-virtual {p0, p1}, Lcom/google/android/material/internal/CheckableImageButton;->sendAccessibilityEvent(I)V
:cond_e
return-void
.end method
.method public toggle()V
.registers 2
.line 87
iget-boolean v0, p0, Lcom/google/android/material/internal/CheckableImageButton;->checked:Z
xor-int/lit8 v0, v0, 0x1
invoke-virtual {p0, v0}, Lcom/google/android/material/internal/CheckableImageButton;->setChecked(Z)V
return-void
.end method