352 lines
11 KiB
Smali
352 lines
11 KiB
Smali
.class final Lcom/google/android/material/button/b;
|
|
.super Ljava/lang/Object;
|
|
.source "MaterialButtonHelper.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field static final aLe:Z
|
|
|
|
|
|
# instance fields
|
|
.field final aLf:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
.field aLg:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final aLh:Landroid/graphics/Paint;
|
|
|
|
.field aLi:Landroid/graphics/drawable/GradientDrawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field aLj:Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field aLk:Landroid/graphics/drawable/GradientDrawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field aLl:Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field aLm:Landroid/graphics/drawable/GradientDrawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field aLn:Landroid/graphics/drawable/GradientDrawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field aLo:Landroid/graphics/drawable/GradientDrawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field aLp:Z
|
|
|
|
.field backgroundTint:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field backgroundTintMode:Landroid/graphics/PorterDuff$Mode;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field cornerRadius:I
|
|
|
|
.field final fL:Landroid/graphics/Rect;
|
|
|
|
.field insetBottom:I
|
|
|
|
.field insetLeft:I
|
|
|
|
.field insetRight:I
|
|
|
|
.field insetTop:I
|
|
|
|
.field final rectF:Landroid/graphics/RectF;
|
|
|
|
.field rippleColor:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field strokeWidth:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x15
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
sput-boolean v0, Lcom/google/android/material/button/b;->aLe:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/google/android/material/button/MaterialButton;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Landroid/graphics/Paint;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/button/b;->aLh:Landroid/graphics/Paint;
|
|
|
|
new-instance v0, Landroid/graphics/Rect;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/button/b;->fL:Landroid/graphics/Rect;
|
|
|
|
new-instance v0, Landroid/graphics/RectF;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/button/b;->rectF:Landroid/graphics/RectF;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/google/android/material/button/b;->aLp:Z
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/button/b;->aLf:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method final k(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/InsetDrawable;
|
|
.locals 7
|
|
|
|
new-instance v6, Landroid/graphics/drawable/InsetDrawable;
|
|
|
|
iget v2, p0, Lcom/google/android/material/button/b;->insetLeft:I
|
|
|
|
iget v3, p0, Lcom/google/android/material/button/b;->insetTop:I
|
|
|
|
iget v4, p0, Lcom/google/android/material/button/b;->insetRight:I
|
|
|
|
iget v5, p0, Lcom/google/android/material/button/b;->insetBottom:I
|
|
|
|
move-object v0, v6
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-direct/range {v0 .. v5}, Landroid/graphics/drawable/InsetDrawable;-><init>(Landroid/graphics/drawable/Drawable;IIII)V
|
|
|
|
return-object v6
|
|
.end method
|
|
|
|
.method final vw()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->aLm:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/button/b;->backgroundTint:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {v0, v1}, Landroidx/core/graphics/drawable/DrawableCompat;->setTintList(Landroid/graphics/drawable/Drawable;Landroid/content/res/ColorStateList;)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->backgroundTintMode:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/button/b;->aLm:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
invoke-static {v1, v0}, Landroidx/core/graphics/drawable/DrawableCompat;->setTintMode(Landroid/graphics/drawable/Drawable;Landroid/graphics/PorterDuff$Mode;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method final vx()Landroid/graphics/drawable/Drawable;
|
|
.locals 6
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x15
|
|
.end annotation
|
|
|
|
new-instance v0, Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/drawable/GradientDrawable;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/button/b;->aLm:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->aLm:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
iget v1, p0, Lcom/google/android/material/button/b;->cornerRadius:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
const v2, 0x3727c5ac # 1.0E-5f
|
|
|
|
add-float/2addr v1, v2
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/drawable/GradientDrawable;->setCornerRadius(F)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->aLm:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
const/4 v1, -0x1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/drawable/GradientDrawable;->setColor(I)V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/button/b;->vw()V
|
|
|
|
new-instance v0, Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/drawable/GradientDrawable;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/button/b;->aLn:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->aLn:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
iget v3, p0, Lcom/google/android/material/button/b;->cornerRadius:I
|
|
|
|
int-to-float v3, v3
|
|
|
|
add-float/2addr v3, v2
|
|
|
|
invoke-virtual {v0, v3}, Landroid/graphics/drawable/GradientDrawable;->setCornerRadius(F)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->aLn:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {v0, v3}, Landroid/graphics/drawable/GradientDrawable;->setColor(I)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->aLn:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
iget v4, p0, Lcom/google/android/material/button/b;->strokeWidth:I
|
|
|
|
iget-object v5, p0, Lcom/google/android/material/button/b;->aLg:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-virtual {v0, v4, v5}, Landroid/graphics/drawable/GradientDrawable;->setStroke(ILandroid/content/res/ColorStateList;)V
|
|
|
|
new-instance v0, Landroid/graphics/drawable/LayerDrawable;
|
|
|
|
const/4 v4, 0x2
|
|
|
|
new-array v4, v4, [Landroid/graphics/drawable/Drawable;
|
|
|
|
iget-object v5, p0, Lcom/google/android/material/button/b;->aLm:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
aput-object v5, v4, v3
|
|
|
|
iget-object v3, p0, Lcom/google/android/material/button/b;->aLn:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
const/4 v5, 0x1
|
|
|
|
aput-object v3, v4, v5
|
|
|
|
invoke-direct {v0, v4}, Landroid/graphics/drawable/LayerDrawable;-><init>([Landroid/graphics/drawable/Drawable;)V
|
|
|
|
invoke-virtual {p0, v0}, Lcom/google/android/material/button/b;->k(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/InsetDrawable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v3, Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
invoke-direct {v3}, Landroid/graphics/drawable/GradientDrawable;-><init>()V
|
|
|
|
iput-object v3, p0, Lcom/google/android/material/button/b;->aLo:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
iget-object v3, p0, Lcom/google/android/material/button/b;->aLo:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
iget v4, p0, Lcom/google/android/material/button/b;->cornerRadius:I
|
|
|
|
int-to-float v4, v4
|
|
|
|
add-float/2addr v4, v2
|
|
|
|
invoke-virtual {v3, v4}, Landroid/graphics/drawable/GradientDrawable;->setCornerRadius(F)V
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/button/b;->aLo:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
invoke-virtual {v2, v1}, Landroid/graphics/drawable/GradientDrawable;->setColor(I)V
|
|
|
|
new-instance v1, Lcom/google/android/material/button/a;
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/button/b;->rippleColor:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {v2}, Lcom/google/android/material/ripple/RippleUtils;->convertToRippleDrawableColor(Landroid/content/res/ColorStateList;)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lcom/google/android/material/button/b;->aLo:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
invoke-direct {v1, v2, v0, v3}, Lcom/google/android/material/button/a;-><init>(Landroid/content/res/ColorStateList;Landroid/graphics/drawable/InsetDrawable;Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-object v1
|
|
.end method
|
|
|
|
.method final vy()V
|
|
.locals 2
|
|
|
|
sget-boolean v0, Lcom/google/android/material/button/b;->aLe:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->aLn:Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->aLf:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/button/b;->vx()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/google/android/material/button/MaterialButton;->setInternalBackground(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
sget-boolean v0, Lcom/google/android/material/button/b;->aLe:Z
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/button/b;->aLf:Lcom/google/android/material/button/MaterialButton;
|
|
|
|
invoke-virtual {v0}, Lcom/google/android/material/button/MaterialButton;->invalidate()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|