You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
295 lines
7.0 KiB
295 lines
7.0 KiB
2 years ago
|
.class public Lcom/afollestad/materialdialogs/internal/MDButton;
|
||
|
.super Landroid/widget/TextView;
|
||
|
.source "MDButton.java"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation build Landroid/annotation/SuppressLint;
|
||
|
value = {
|
||
|
"AppCompatCustomView"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field private a:Z
|
||
|
|
||
|
.field private b:Lcom/afollestad/materialdialogs/e;
|
||
|
|
||
|
.field private c:I
|
||
|
|
||
|
.field private d:Landroid/graphics/drawable/Drawable;
|
||
|
|
||
|
.field private e:Landroid/graphics/drawable/Drawable;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 27
|
||
|
invoke-direct {p0, p1, p2}, Landroid/widget/TextView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
||
|
|
||
|
.line 19
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
iput-boolean v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->a:Z
|
||
|
|
||
|
.line 28
|
||
|
invoke-direct {p0, p1}, Lcom/afollestad/materialdialogs/internal/MDButton;->a(Landroid/content/Context;)V
|
||
|
|
||
|
.line 29
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 32
|
||
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/TextView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
||
|
|
||
|
.line 19
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
iput-boolean v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->a:Z
|
||
|
|
||
|
.line 33
|
||
|
invoke-direct {p0, p1}, Lcom/afollestad/materialdialogs/internal/MDButton;->a(Landroid/content/Context;)V
|
||
|
|
||
|
.line 34
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private a(Landroid/content/Context;)V
|
||
|
.locals 2
|
||
|
|
||
|
.prologue
|
||
|
.line 37
|
||
|
.line 38
|
||
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
sget v1, Lcom/afollestad/materialdialogs/R$dimen;->md_dialog_frame_margin:I
|
||
|
|
||
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
iput v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->c:I
|
||
|
|
||
|
.line 39
|
||
|
sget-object v0, Lcom/afollestad/materialdialogs/e;->c:Lcom/afollestad/materialdialogs/e;
|
||
|
|
||
|
iput-object v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->b:Lcom/afollestad/materialdialogs/e;
|
||
|
|
||
|
.line 40
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method a(ZZ)V
|
||
|
.locals 4
|
||
|
|
||
|
.prologue
|
||
|
const/16 v1, 0x11
|
||
|
|
||
|
.line 47
|
||
|
iget-boolean v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->a:Z
|
||
|
|
||
|
if-ne v0, p1, :cond_0
|
||
|
|
||
|
if-eqz p2, :cond_3
|
||
|
|
||
|
.line 49
|
||
|
:cond_0
|
||
|
if-eqz p1, :cond_4
|
||
|
|
||
|
iget-object v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->b:Lcom/afollestad/materialdialogs/e;
|
||
|
|
||
|
.line 50
|
||
|
invoke-virtual {v0}, Lcom/afollestad/materialdialogs/e;->a()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
or-int/lit8 v0, v0, 0x10
|
||
|
|
||
|
.line 49
|
||
|
:goto_0
|
||
|
invoke-virtual {p0, v0}, Lcom/afollestad/materialdialogs/internal/MDButton;->setGravity(I)V
|
||
|
|
||
|
.line 51
|
||
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
||
|
|
||
|
if-lt v0, v1, :cond_1
|
||
|
|
||
|
.line 53
|
||
|
if-eqz p1, :cond_5
|
||
|
|
||
|
iget-object v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->b:Lcom/afollestad/materialdialogs/e;
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/afollestad/materialdialogs/e;->b()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
:goto_1
|
||
|
invoke-virtual {p0, v0}, Lcom/afollestad/materialdialogs/internal/MDButton;->setTextAlignment(I)V
|
||
|
|
||
|
.line 56
|
||
|
:cond_1
|
||
|
if-eqz p1, :cond_6
|
||
|
|
||
|
iget-object v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->d:Landroid/graphics/drawable/Drawable;
|
||
|
|
||
|
:goto_2
|
||
|
invoke-static {p0, v0}, Lcom/afollestad/materialdialogs/a/a;->a(Landroid/view/View;Landroid/graphics/drawable/Drawable;)V
|
||
|
|
||
|
.line 57
|
||
|
if-eqz p1, :cond_2
|
||
|
|
||
|
.line 58
|
||
|
iget v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->c:I
|
||
|
|
||
|
invoke-virtual {p0}, Lcom/afollestad/materialdialogs/internal/MDButton;->getPaddingTop()I
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
iget v2, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->c:I
|
||
|
|
||
|
invoke-virtual {p0}, Lcom/afollestad/materialdialogs/internal/MDButton;->getPaddingBottom()I
|
||
|
|
||
|
move-result v3
|
||
|
|
||
|
invoke-virtual {p0, v0, v1, v2, v3}, Lcom/afollestad/materialdialogs/internal/MDButton;->setPadding(IIII)V
|
||
|
|
||
|
.line 61
|
||
|
:cond_2
|
||
|
iput-boolean p1, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->a:Z
|
||
|
|
||
|
.line 63
|
||
|
:cond_3
|
||
|
return-void
|
||
|
|
||
|
:cond_4
|
||
|
move v0, v1
|
||
|
|
||
|
.line 50
|
||
|
goto :goto_0
|
||
|
|
||
|
.line 53
|
||
|
:cond_5
|
||
|
const/4 v0, 0x4
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
.line 56
|
||
|
:cond_6
|
||
|
iget-object v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->e:Landroid/graphics/drawable/Drawable;
|
||
|
|
||
|
goto :goto_2
|
||
|
.end method
|
||
|
|
||
|
.method public setAllCapsCompat(Z)V
|
||
|
.locals 2
|
||
|
|
||
|
.prologue
|
||
|
.line 84
|
||
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
||
|
|
||
|
const/16 v1, 0xe
|
||
|
|
||
|
if-lt v0, v1, :cond_0
|
||
|
|
||
|
.line 85
|
||
|
invoke-virtual {p0, p1}, Lcom/afollestad/materialdialogs/internal/MDButton;->setAllCaps(Z)V
|
||
|
|
||
|
.line 93
|
||
|
:goto_0
|
||
|
return-void
|
||
|
|
||
|
.line 87
|
||
|
:cond_0
|
||
|
if-eqz p1, :cond_1
|
||
|
|
||
|
.line 88
|
||
|
new-instance v0, Lcom/afollestad/materialdialogs/internal/a;
|
||
|
|
||
|
invoke-virtual {p0}, Lcom/afollestad/materialdialogs/internal/MDButton;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Lcom/afollestad/materialdialogs/internal/a;-><init>(Landroid/content/Context;)V
|
||
|
|
||
|
invoke-virtual {p0, v0}, Lcom/afollestad/materialdialogs/internal/MDButton;->setTransformationMethod(Landroid/text/method/TransformationMethod;)V
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
.line 90
|
||
|
:cond_1
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
invoke-virtual {p0, v0}, Lcom/afollestad/materialdialogs/internal/MDButton;->setTransformationMethod(Landroid/text/method/TransformationMethod;)V
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public setDefaultSelector(Landroid/graphics/drawable/Drawable;)V
|
||
|
.locals 2
|
||
|
|
||
|
.prologue
|
||
|
.line 77
|
||
|
iput-object p1, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->e:Landroid/graphics/drawable/Drawable;
|
||
|
|
||
|
.line 78
|
||
|
iget-boolean v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->a:Z
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
.line 79
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
invoke-virtual {p0, v0, v1}, Lcom/afollestad/materialdialogs/internal/MDButton;->a(ZZ)V
|
||
|
|
||
|
.line 81
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public setStackedGravity(Lcom/afollestad/materialdialogs/e;)V
|
||
|
.locals 0
|
||
|
|
||
|
.prologue
|
||
|
.line 66
|
||
|
iput-object p1, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->b:Lcom/afollestad/materialdialogs/e;
|
||
|
|
||
|
.line 67
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public setStackedSelector(Landroid/graphics/drawable/Drawable;)V
|
||
|
.locals 2
|
||
|
|
||
|
.prologue
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
.line 70
|
||
|
iput-object p1, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->d:Landroid/graphics/drawable/Drawable;
|
||
|
|
||
|
.line 71
|
||
|
iget-boolean v0, p0, Lcom/afollestad/materialdialogs/internal/MDButton;->a:Z
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
.line 72
|
||
|
invoke-virtual {p0, v1, v1}, Lcom/afollestad/materialdialogs/internal/MDButton;->a(ZZ)V
|
||
|
|
||
|
.line 74
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|