5639 lines
163 KiB
Smali
5639 lines
163 KiB
Smali
.class public Lcom/google/android/material/chip/ChipDrawable;
|
|
.super Landroid/graphics/drawable/Drawable;
|
|
.source "ChipDrawable.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/graphics/drawable/Drawable$Callback;
|
|
.implements Landroidx/core/graphics/drawable/TintAwareDrawable;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/android/material/chip/ChipDrawable$Delegate;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final DEBUG:Z = false
|
|
|
|
.field private static final DEFAULT_STATE:[I
|
|
|
|
.field private static final NAMESPACE_APP:Ljava/lang/String; = "http://schemas.android.com/apk/res-auto"
|
|
|
|
|
|
# instance fields
|
|
.field private alpha:I
|
|
|
|
.field private checkable:Z
|
|
|
|
.field private checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private checkedIconVisible:Z
|
|
|
|
.field private chipBackgroundColor:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private chipCornerRadius:F
|
|
|
|
.field private chipEndPadding:F
|
|
|
|
.field private chipIcon:Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private chipIconSize:F
|
|
|
|
.field private chipIconTint:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private chipIconVisible:Z
|
|
|
|
.field private chipMinHeight:F
|
|
|
|
.field private final chipPaint:Landroid/graphics/Paint;
|
|
|
|
.field private chipStartPadding:F
|
|
|
|
.field private chipStrokeColor:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private chipStrokeWidth:F
|
|
|
|
.field private closeIcon:Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private closeIconContentDescription:Ljava/lang/CharSequence;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private closeIconEndPadding:F
|
|
|
|
.field private closeIconSize:F
|
|
|
|
.field private closeIconStartPadding:F
|
|
|
|
.field private closeIconStateSet:[I
|
|
|
|
.field private closeIconTint:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private closeIconVisible:Z
|
|
|
|
.field private colorFilter:Landroid/graphics/ColorFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private compatRippleColor:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final context:Landroid/content/Context;
|
|
|
|
.field private currentChecked:Z
|
|
|
|
.field private currentChipBackgroundColor:I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private currentChipStrokeColor:I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private currentCompatRippleColor:I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private currentTextColor:I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private currentTint:I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final debugPaint:Landroid/graphics/Paint;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private delegate:Ljava/lang/ref/WeakReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/ref/WeakReference<",
|
|
"Lcom/google/android/material/chip/ChipDrawable$Delegate;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final fontCallback:Landroidx/core/content/res/ResourcesCompat$FontCallback;
|
|
|
|
.field private final fontMetrics:Landroid/graphics/Paint$FontMetrics;
|
|
|
|
.field private hideMotionSpec:Lcom/google/android/material/animation/MotionSpec;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private iconEndPadding:F
|
|
|
|
.field private iconStartPadding:F
|
|
|
|
.field private maxWidth:I
|
|
|
|
.field private final pointF:Landroid/graphics/PointF;
|
|
|
|
.field private rawText:Ljava/lang/CharSequence;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final rectF:Landroid/graphics/RectF;
|
|
|
|
.field private rippleColor:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private shouldDrawText:Z
|
|
|
|
.field private showMotionSpec:Lcom/google/android/material/animation/MotionSpec;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private textAppearance:Lcom/google/android/material/resources/TextAppearance;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private textEndPadding:F
|
|
|
|
.field private final textPaint:Landroid/text/TextPaint;
|
|
|
|
.field private textStartPadding:F
|
|
|
|
.field private textWidth:F
|
|
|
|
.field private textWidthDirty:Z
|
|
|
|
.field private tint:Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private tintFilter:Landroid/graphics/PorterDuffColorFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private tintMode:Landroid/graphics/PorterDuff$Mode;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private truncateAt:Landroid/text/TextUtils$TruncateAt;
|
|
|
|
.field private unicodeWrappedText:Ljava/lang/CharSequence;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private useCompatRipple:Z
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x1
|
|
|
|
new-array v0, v0, [I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const v2, 0x101009e
|
|
|
|
aput v2, v0, v1
|
|
|
|
sput-object v0, Lcom/google/android/material/chip/ChipDrawable;->DEFAULT_STATE:[I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Landroid/content/Context;)V
|
|
.locals 3
|
|
|
|
invoke-direct {p0}, Landroid/graphics/drawable/Drawable;-><init>()V
|
|
|
|
new-instance v0, Lcom/google/android/material/chip/ChipDrawable$1;
|
|
|
|
invoke-direct {v0, p0}, Lcom/google/android/material/chip/ChipDrawable$1;-><init>(Lcom/google/android/material/chip/ChipDrawable;)V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->fontCallback:Landroidx/core/content/res/ResourcesCompat$FontCallback;
|
|
|
|
new-instance v0, Landroid/text/TextPaint;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {v0, v1}, Landroid/text/TextPaint;-><init>(I)V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
new-instance v0, Landroid/graphics/Paint;
|
|
|
|
invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
new-instance v0, Landroid/graphics/Paint$FontMetrics;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/Paint$FontMetrics;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->fontMetrics:Landroid/graphics/Paint$FontMetrics;
|
|
|
|
new-instance v0, Landroid/graphics/RectF;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
new-instance v0, Landroid/graphics/PointF;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/PointF;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->pointF:Landroid/graphics/PointF;
|
|
|
|
const/16 v0, 0xff
|
|
|
|
iput v0, p0, Lcom/google/android/material/chip/ChipDrawable;->alpha:I
|
|
|
|
sget-object v0, Landroid/graphics/PorterDuff$Mode;->SRC_IN:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->tintMode:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
new-instance v0, Ljava/lang/ref/WeakReference;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v0, v2}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->delegate:Ljava/lang/ref/WeakReference;
|
|
|
|
iput-boolean v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textWidthDirty:Z
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
const-string v0, ""
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rawText:Ljava/lang/CharSequence;
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object p1
|
|
|
|
iget p1, p1, Landroid/util/DisplayMetrics;->density:F
|
|
|
|
iput p1, v0, Landroid/text/TextPaint;->density:F
|
|
|
|
iput-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
sget-object v0, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
|
|
|
|
:cond_0
|
|
sget-object p1, Lcom/google/android/material/chip/ChipDrawable;->DEFAULT_STATE:[I
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setState([I)Z
|
|
|
|
sget-object p1, Lcom/google/android/material/chip/ChipDrawable;->DEFAULT_STATE:[I
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconState([I)Z
|
|
|
|
iput-boolean v1, p0, Lcom/google/android/material/chip/ChipDrawable;->shouldDrawText:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$002(Lcom/google/android/material/chip/ChipDrawable;Z)Z
|
|
.locals 0
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->textWidthDirty:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method private applyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
.locals 2
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p1, p0}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V
|
|
|
|
invoke-static {p0}, Landroidx/core/graphics/drawable/DrawableCompat;->getLayoutDirection(Landroid/graphics/drawable/Drawable;)I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {p1, v0}, Landroidx/core/graphics/drawable/DrawableCompat;->setLayoutDirection(Landroid/graphics/drawable/Drawable;I)Z
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getLevel()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setLevel(I)Z
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->isVisible()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/graphics/drawable/Drawable;->setVisible(ZZ)Z
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-ne p1, v0, :cond_1
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getCloseIconState()[I
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setState([I)Z
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconTint:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {p1, v0}, Landroidx/core/graphics/drawable/DrawableCompat;->setTintList(Landroid/graphics/drawable/Drawable;Landroid/content/res/ColorStateList;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setState([I)Z
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method private calculateChipIconBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
.locals 2
|
|
|
|
invoke-virtual {p2}, Landroid/graphics/RectF;->setEmpty()V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCheckedIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
:cond_0
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStartPadding:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->iconStartPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
invoke-static {p0}, Landroidx/core/graphics/drawable/DrawableCompat;->getLayoutDirection(Landroid/graphics/drawable/Drawable;)I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
iget v1, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
add-float/2addr v1, v0
|
|
|
|
iput v1, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget v0, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconSize:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iput v0, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget v1, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
iput v1, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
iget v0, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconSize:F
|
|
|
|
sub-float/2addr v0, v1
|
|
|
|
iput v0, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
:goto_0
|
|
invoke-virtual {p1}, Landroid/graphics/Rect;->exactCenterY()F
|
|
|
|
move-result p1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconSize:F
|
|
|
|
const/high16 v1, 0x40000000 # 2.0f
|
|
|
|
div-float/2addr v0, v1
|
|
|
|
sub-float/2addr p1, v0
|
|
|
|
iput p1, p2, Landroid/graphics/RectF;->top:F
|
|
|
|
iget p1, p2, Landroid/graphics/RectF;->top:F
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconSize:F
|
|
|
|
add-float/2addr p1, v0
|
|
|
|
iput p1, p2, Landroid/graphics/RectF;->bottom:F
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method private calculateChipTouchBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
.locals 2
|
|
|
|
invoke-virtual {p2, p1}, Landroid/graphics/RectF;->set(Landroid/graphics/Rect;)V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipEndPadding:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconEndPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconStartPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textEndPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
invoke-static {p0}, Landroidx/core/graphics/drawable/DrawableCompat;->getLayoutDirection(Landroid/graphics/drawable/Drawable;)I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget p1, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float p1, p1
|
|
|
|
sub-float/2addr p1, v0
|
|
|
|
iput p1, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget p1, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float p1, p1
|
|
|
|
add-float/2addr p1, v0
|
|
|
|
iput p1, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private calculateCloseIconBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
.locals 2
|
|
|
|
invoke-virtual {p2}, Landroid/graphics/RectF;->setEmpty()V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipEndPadding:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconEndPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
invoke-static {p0}, Landroidx/core/graphics/drawable/DrawableCompat;->getLayoutDirection(Landroid/graphics/drawable/Drawable;)I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget v1, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
iput v1, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
iget v0, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
sub-float/2addr v0, v1
|
|
|
|
iput v0, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget v1, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
add-float/2addr v1, v0
|
|
|
|
iput v1, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget v0, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iput v0, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
:goto_0
|
|
invoke-virtual {p1}, Landroid/graphics/Rect;->exactCenterY()F
|
|
|
|
move-result p1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
const/high16 v1, 0x40000000 # 2.0f
|
|
|
|
div-float/2addr v0, v1
|
|
|
|
sub-float/2addr p1, v0
|
|
|
|
iput p1, p2, Landroid/graphics/RectF;->top:F
|
|
|
|
iget p1, p2, Landroid/graphics/RectF;->top:F
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
add-float/2addr p1, v0
|
|
|
|
iput p1, p2, Landroid/graphics/RectF;->bottom:F
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private calculateCloseIconTouchBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
.locals 2
|
|
|
|
invoke-virtual {p2}, Landroid/graphics/RectF;->setEmpty()V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipEndPadding:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconEndPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconStartPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textEndPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
invoke-static {p0}, Landroidx/core/graphics/drawable/DrawableCompat;->getLayoutDirection(Landroid/graphics/drawable/Drawable;)I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget v1, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
iput v1, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
iget v1, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
iput v1, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget v1, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
iput v1, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget v1, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
add-float/2addr v1, v0
|
|
|
|
iput v1, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
:goto_0
|
|
iget v0, p1, Landroid/graphics/Rect;->top:I
|
|
|
|
int-to-float v0, v0
|
|
|
|
iput v0, p2, Landroid/graphics/RectF;->top:F
|
|
|
|
iget p1, p1, Landroid/graphics/Rect;->bottom:I
|
|
|
|
int-to-float p1, p1
|
|
|
|
iput p1, p2, Landroid/graphics/RectF;->bottom:F
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private calculateCloseIconWidth()F
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconStartPadding:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconEndPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private calculateTextBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
.locals 3
|
|
|
|
invoke-virtual {p2}, Landroid/graphics/RectF;->setEmpty()V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->unicodeWrappedText:Ljava/lang/CharSequence;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStartPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v1
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textStartPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipEndPadding:F
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateCloseIconWidth()F
|
|
|
|
move-result v2
|
|
|
|
add-float/2addr v1, v2
|
|
|
|
iget v2, p0, Lcom/google/android/material/chip/ChipDrawable;->textEndPadding:F
|
|
|
|
add-float/2addr v1, v2
|
|
|
|
invoke-static {p0}, Landroidx/core/graphics/drawable/DrawableCompat;->getLayoutDirection(Landroid/graphics/drawable/Drawable;)I
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
iget v2, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v2, v2
|
|
|
|
add-float/2addr v2, v0
|
|
|
|
iput v2, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget v0, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float v0, v0
|
|
|
|
sub-float/2addr v0, v1
|
|
|
|
iput v0, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget v2, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v2, v2
|
|
|
|
add-float/2addr v2, v1
|
|
|
|
iput v2, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget v1, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
iput v1, p2, Landroid/graphics/RectF;->right:F
|
|
|
|
:goto_0
|
|
iget v0, p1, Landroid/graphics/Rect;->top:I
|
|
|
|
int-to-float v0, v0
|
|
|
|
iput v0, p2, Landroid/graphics/RectF;->top:F
|
|
|
|
iget p1, p1, Landroid/graphics/Rect;->bottom:I
|
|
|
|
int-to-float p1, p1
|
|
|
|
iput p1, p2, Landroid/graphics/RectF;->bottom:F
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private calculateTextCenterFromBaseline()F
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->fontMetrics:Landroid/graphics/Paint$FontMetrics;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->getFontMetrics(Landroid/graphics/Paint$FontMetrics;)F
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->fontMetrics:Landroid/graphics/Paint$FontMetrics;
|
|
|
|
iget v0, v0, Landroid/graphics/Paint$FontMetrics;->descent:F
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->fontMetrics:Landroid/graphics/Paint$FontMetrics;
|
|
|
|
iget v1, v1, Landroid/graphics/Paint$FontMetrics;->ascent:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
const/high16 v1, 0x40000000 # 2.0f
|
|
|
|
div-float/2addr v0, v1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private calculateTextWidth(Ljava/lang/CharSequence;)F
|
|
.locals 3
|
|
.param p1 # Ljava/lang/CharSequence;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v0, p1, v1, v2}, Landroid/text/TextPaint;->measureText(Ljava/lang/CharSequence;II)F
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method private canShowCheckedIcon()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIconVisible:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkable:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static createFromAttributes(Landroid/content/Context;Landroid/util/AttributeSet;II)Lcom/google/android/material/chip/ChipDrawable;
|
|
.locals 1
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/AttrRes;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # I
|
|
.annotation build Landroidx/annotation/StyleRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
new-instance v0, Lcom/google/android/material/chip/ChipDrawable;
|
|
|
|
invoke-direct {v0, p0}, Lcom/google/android/material/chip/ChipDrawable;-><init>(Landroid/content/Context;)V
|
|
|
|
invoke-direct {v0, p1, p2, p3}, Lcom/google/android/material/chip/ChipDrawable;->loadFromAttributes(Landroid/util/AttributeSet;II)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static createFromResource(Landroid/content/Context;I)Lcom/google/android/material/chip/ChipDrawable;
|
|
.locals 4
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/XmlRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
:try_start_0
|
|
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
invoke-interface {v0}, Lorg/xmlpull/v1/XmlPullParser;->next()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-ne v1, v3, :cond_0
|
|
|
|
:cond_1
|
|
if-ne v1, v2, :cond_4
|
|
|
|
invoke-interface {v0}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "chip"
|
|
|
|
invoke-static {v1, v2}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
invoke-static {v0}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Landroid/util/AttributeSet;->getStyleAttribute()I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
sget v1, Lcom/google/android/material/R$style;->Widget_MaterialComponents_Chip_Entry:I
|
|
|
|
:cond_2
|
|
sget v2, Lcom/google/android/material/R$attr;->chipStandaloneStyle:I
|
|
|
|
invoke-static {p0, v0, v2, v1}, Lcom/google/android/material/chip/ChipDrawable;->createFromAttributes(Landroid/content/Context;Landroid/util/AttributeSet;II)Lcom/google/android/material/chip/ChipDrawable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_3
|
|
new-instance p0, Lorg/xmlpull/v1/XmlPullParserException;
|
|
|
|
const-string v0, "Must have a <chip> start tag"
|
|
|
|
invoke-direct {p0, v0}, Lorg/xmlpull/v1/XmlPullParserException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
:cond_4
|
|
new-instance p0, Lorg/xmlpull/v1/XmlPullParserException;
|
|
|
|
const-string v0, "No start tag found"
|
|
|
|
invoke-direct {p0, v0}, Lorg/xmlpull/v1/XmlPullParserException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
:try_end_0
|
|
.catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
new-instance v0, Landroid/content/res/Resources$NotFoundException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "Can\'t load chip resource ID #0x"
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Landroid/content/res/Resources$NotFoundException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, p0}, Landroid/content/res/Resources$NotFoundException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private drawCheckedIcon(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
.locals 5
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCheckedIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-direct {p0, p2, v0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget p2, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget v0, v0, Landroid/graphics/RectF;->top:F
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/graphics/Canvas;->translate(FF)V
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v2}, Landroid/graphics/RectF;->width()F
|
|
|
|
move-result v2
|
|
|
|
float-to-int v2, v2
|
|
|
|
iget-object v3, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v3}, Landroid/graphics/RectF;->height()F
|
|
|
|
move-result v3
|
|
|
|
float-to-int v3, v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-virtual {v1, v4, v4, v2, v3}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
|
|
|
|
neg-float p2, p2
|
|
|
|
neg-float v0, v0
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/graphics/Canvas;->translate(FF)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private drawChipBackground(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
.locals 2
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChipBackgroundColor:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
sget-object v1, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->getTintColorFilter()Landroid/graphics/ColorFilter;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v0, p2}, Landroid/graphics/RectF;->set(Landroid/graphics/Rect;)V
|
|
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipCornerRadius:F
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, p2, v0, v0, v1}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private drawChipIcon(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
.locals 5
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-direct {p0, p2, v0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget p2, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget v0, v0, Landroid/graphics/RectF;->top:F
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/graphics/Canvas;->translate(FF)V
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v2}, Landroid/graphics/RectF;->width()F
|
|
|
|
move-result v2
|
|
|
|
float-to-int v2, v2
|
|
|
|
iget-object v3, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v3}, Landroid/graphics/RectF;->height()F
|
|
|
|
move-result v3
|
|
|
|
float-to-int v3, v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-virtual {v1, v4, v4, v2, v3}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
|
|
|
|
neg-float p2, p2
|
|
|
|
neg-float v0, v0
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/graphics/Canvas;->translate(FF)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private drawChipStroke(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
.locals 6
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeWidth:F
|
|
|
|
const/4 v1, 0x0
|
|
|
|
cmpl-float v0, v0, v1
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChipStrokeColor:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
sget-object v1, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->getTintColorFilter()Landroid/graphics/ColorFilter;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget v1, p2, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
iget v2, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeWidth:F
|
|
|
|
const/high16 v3, 0x40000000 # 2.0f
|
|
|
|
div-float/2addr v2, v3
|
|
|
|
add-float/2addr v1, v2
|
|
|
|
iget v2, p2, Landroid/graphics/Rect;->top:I
|
|
|
|
int-to-float v2, v2
|
|
|
|
iget v4, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeWidth:F
|
|
|
|
div-float/2addr v4, v3
|
|
|
|
add-float/2addr v2, v4
|
|
|
|
iget v4, p2, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float v4, v4
|
|
|
|
iget v5, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeWidth:F
|
|
|
|
div-float/2addr v5, v3
|
|
|
|
sub-float/2addr v4, v5
|
|
|
|
iget p2, p2, Landroid/graphics/Rect;->bottom:I
|
|
|
|
int-to-float p2, p2
|
|
|
|
iget v5, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeWidth:F
|
|
|
|
div-float/2addr v5, v3
|
|
|
|
sub-float/2addr p2, v5
|
|
|
|
invoke-virtual {v0, v1, v2, v4, p2}, Landroid/graphics/RectF;->set(FFFF)V
|
|
|
|
iget p2, p0, Lcom/google/android/material/chip/ChipDrawable;->chipCornerRadius:F
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeWidth:F
|
|
|
|
div-float/2addr v0, v3
|
|
|
|
sub-float/2addr p2, v0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, v0, p2, p2, v1}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private drawCloseIcon(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
.locals 5
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-direct {p0, p2, v0}, Lcom/google/android/material/chip/ChipDrawable;->calculateCloseIconBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget p2, p2, Landroid/graphics/RectF;->left:F
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget v0, v0, Landroid/graphics/RectF;->top:F
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/graphics/Canvas;->translate(FF)V
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v2}, Landroid/graphics/RectF;->width()F
|
|
|
|
move-result v2
|
|
|
|
float-to-int v2, v2
|
|
|
|
iget-object v3, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v3}, Landroid/graphics/RectF;->height()F
|
|
|
|
move-result v3
|
|
|
|
float-to-int v3, v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-virtual {v1, v4, v4, v2, v3}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
|
|
|
|
neg-float p2, p2
|
|
|
|
neg-float v0, v0
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/graphics/Canvas;->translate(FF)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private drawCompatRipple(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
.locals 2
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentCompatRippleColor:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
sget-object v1, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v0, p2}, Landroid/graphics/RectF;->set(Landroid/graphics/Rect;)V
|
|
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipCornerRadius:F
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, p2, v0, v0, v1}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private drawDebug(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
.locals 9
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
const/high16 v1, -0x1000000
|
|
|
|
const/16 v2, 0x7f
|
|
|
|
invoke-static {v1, v2}, Landroidx/core/graphics/ColorUtils;->setAlphaComponent(II)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCheckedIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-direct {p0, p2, v0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/RectF;Landroid/graphics/Paint;)V
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->unicodeWrappedText:Ljava/lang/CharSequence;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget v0, p2, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v4, v0
|
|
|
|
invoke-virtual {p2}, Landroid/graphics/Rect;->exactCenterY()F
|
|
|
|
move-result v5
|
|
|
|
iget v0, p2, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float v6, v0
|
|
|
|
invoke-virtual {p2}, Landroid/graphics/Rect;->exactCenterY()F
|
|
|
|
move-result v7
|
|
|
|
iget-object v8, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
move-object v3, p1
|
|
|
|
invoke-virtual/range {v3 .. v8}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V
|
|
|
|
:cond_2
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-direct {p0, p2, v0}, Lcom/google/android/material/chip/ChipDrawable;->calculateCloseIconBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/RectF;Landroid/graphics/Paint;)V
|
|
|
|
:cond_3
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
const/high16 v1, -0x10000
|
|
|
|
invoke-static {v1, v2}, Landroidx/core/graphics/ColorUtils;->setAlphaComponent(II)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-direct {p0, p2, v0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipTouchBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/RectF;Landroid/graphics/Paint;)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
const v1, -0xff0100
|
|
|
|
invoke-static {v1, v2}, Landroidx/core/graphics/ColorUtils;->setAlphaComponent(II)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-direct {p0, p2, v0}, Lcom/google/android/material/chip/ChipDrawable;->calculateCloseIconTouchBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->debugPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/RectF;Landroid/graphics/Paint;)V
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method private drawText(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
.locals 9
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->unicodeWrappedText:Ljava/lang/CharSequence;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->pointF:Landroid/graphics/PointF;
|
|
|
|
invoke-virtual {p0, p2, v0}, Lcom/google/android/material/chip/ChipDrawable;->calculateTextOriginAndAlignment(Landroid/graphics/Rect;Landroid/graphics/PointF;)Landroid/graphics/Paint$Align;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-direct {p0, p2, v1}, Lcom/google/android/material/chip/ChipDrawable;->calculateTextBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->textAppearance:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p2, Landroid/text/TextPaint;->drawableState:[I
|
|
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->textAppearance:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
iget-object v3, p0, Lcom/google/android/material/chip/ChipDrawable;->fontCallback:Landroidx/core/content/res/ResourcesCompat$FontCallback;
|
|
|
|
invoke-virtual {p2, v1, v2, v3}, Lcom/google/android/material/resources/TextAppearance;->updateDrawState(Landroid/content/Context;Landroid/text/TextPaint;Landroidx/core/content/res/ResourcesCompat$FontCallback;)V
|
|
|
|
:cond_0
|
|
iget-object p2, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
invoke-virtual {p2, v0}, Landroid/text/TextPaint;->setTextAlign(Landroid/graphics/Paint$Align;)V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->getTextWidth()F
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p2}, Ljava/lang/Math;->round(F)I
|
|
|
|
move-result p2
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/RectF;->width()F
|
|
|
|
move-result v0
|
|
|
|
invoke-static {v0}, Ljava/lang/Math;->round(F)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-le p2, v0, :cond_1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p2, 0x0
|
|
|
|
:goto_0
|
|
if-eqz p2, :cond_2
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I
|
|
|
|
move-result v1
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/Canvas;->clipRect(Landroid/graphics/RectF;)Z
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->unicodeWrappedText:Ljava/lang/CharSequence;
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->truncateAt:Landroid/text/TextUtils$TruncateAt;
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
iget-object v3, p0, Lcom/google/android/material/chip/ChipDrawable;->rectF:Landroid/graphics/RectF;
|
|
|
|
invoke-virtual {v3}, Landroid/graphics/RectF;->width()F
|
|
|
|
move-result v3
|
|
|
|
iget-object v4, p0, Lcom/google/android/material/chip/ChipDrawable;->truncateAt:Landroid/text/TextUtils$TruncateAt;
|
|
|
|
invoke-static {v0, v2, v3, v4}, Landroid/text/TextUtils;->ellipsize(Ljava/lang/CharSequence;Landroid/text/TextPaint;FLandroid/text/TextUtils$TruncateAt;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v3, v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
move-object v3, v0
|
|
|
|
:goto_1
|
|
const/4 v4, 0x0
|
|
|
|
invoke-interface {v3}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v5
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->pointF:Landroid/graphics/PointF;
|
|
|
|
iget v6, v0, Landroid/graphics/PointF;->x:F
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->pointF:Landroid/graphics/PointF;
|
|
|
|
iget v7, v0, Landroid/graphics/PointF;->y:F
|
|
|
|
iget-object v8, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
move-object v2, p1
|
|
|
|
invoke-virtual/range {v2 .. v8}, Landroid/graphics/Canvas;->drawText(Ljava/lang/CharSequence;IIFFLandroid/graphics/Paint;)V
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
invoke-virtual {p1, v1}, Landroid/graphics/Canvas;->restoreToCount(I)V
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method private getTextWidth()F
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textWidthDirty:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textWidth:F
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->unicodeWrappedText:Ljava/lang/CharSequence;
|
|
|
|
invoke-direct {p0, v0}, Lcom/google/android/material/chip/ChipDrawable;->calculateTextWidth(Ljava/lang/CharSequence;)F
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textWidth:F
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textWidthDirty:Z
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textWidth:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private getTintColorFilter()Landroid/graphics/ColorFilter;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->colorFilter:Landroid/graphics/ColorFilter;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->tintFilter:Landroid/graphics/PorterDuffColorFilter;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static hasState([II)Z
|
|
.locals 4
|
|
.param p0 # [I
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/AttrRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
array-length v1, p0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v1, :cond_2
|
|
|
|
aget v3, p0, v2
|
|
|
|
if-ne v3, p1, :cond_1
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return v0
|
|
.end method
|
|
|
|
.method private static isStateful(Landroid/content/res/ColorStateList;)Z
|
|
.locals 0
|
|
.param p0 # Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroid/content/res/ColorStateList;->isStateful()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private static isStateful(Landroid/graphics/drawable/Drawable;)Z
|
|
.locals 0
|
|
.param p0 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->isStateful()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private static isStateful(Lcom/google/android/material/resources/TextAppearance;)Z
|
|
.locals 1
|
|
.param p0 # Lcom/google/android/material/resources/TextAppearance;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->textColor:Landroid/content/res/ColorStateList;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object p0, p0, Lcom/google/android/material/resources/TextAppearance;->textColor:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-virtual {p0}, Landroid/content/res/ColorStateList;->isStateful()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private loadFromAttributes(Landroid/util/AttributeSet;II)V
|
|
.locals 7
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/AttrRes;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # I
|
|
.annotation build Landroidx/annotation/StyleRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget-object v2, Lcom/google/android/material/R$styleable;->Chip:[I
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-array v5, v6, [I
|
|
|
|
move-object v1, p1
|
|
|
|
move v3, p2
|
|
|
|
move v4, p3
|
|
|
|
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
|
|
|
|
iget-object p3, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget v0, Lcom/google/android/material/R$styleable;->Chip_chipBackgroundColor:I
|
|
|
|
invoke-static {p3, p2, v0}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipBackgroundColor(Landroid/content/res/ColorStateList;)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_chipMinHeight:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p2, p3, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipMinHeight(F)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_chipCornerRadius:I
|
|
|
|
invoke-virtual {p2, p3, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipCornerRadius(F)V
|
|
|
|
iget-object p3, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget v1, Lcom/google/android/material/R$styleable;->Chip_chipStrokeColor:I
|
|
|
|
invoke-static {p3, p2, v1}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipStrokeColor(Landroid/content/res/ColorStateList;)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_chipStrokeWidth:I
|
|
|
|
invoke-virtual {p2, p3, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipStrokeWidth(F)V
|
|
|
|
iget-object p3, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget v1, Lcom/google/android/material/R$styleable;->Chip_rippleColor:I
|
|
|
|
invoke-static {p3, p2, v1}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setRippleColor(Landroid/content/res/ColorStateList;)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_android_text:I
|
|
|
|
invoke-virtual {p2, p3}, Landroid/content/res/TypedArray;->getText(I)Ljava/lang/CharSequence;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p3, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget v1, Lcom/google/android/material/R$styleable;->Chip_android_textAppearance:I
|
|
|
|
invoke-static {p3, p2, v1}, Lcom/google/android/material/resources/MaterialResources;->getTextAppearance(Landroid/content/Context;Landroid/content/res/TypedArray;I)Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setTextAppearance(Lcom/google/android/material/resources/TextAppearance;)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_android_ellipsize:I
|
|
|
|
invoke-virtual {p2, p3, v6}, Landroid/content/res/TypedArray;->getInt(II)I
|
|
|
|
move-result p3
|
|
|
|
packed-switch p3, :pswitch_data_0
|
|
|
|
goto :goto_0
|
|
|
|
:pswitch_0
|
|
sget-object p3, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V
|
|
|
|
goto :goto_0
|
|
|
|
:pswitch_1
|
|
sget-object p3, Landroid/text/TextUtils$TruncateAt;->MIDDLE:Landroid/text/TextUtils$TruncateAt;
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V
|
|
|
|
goto :goto_0
|
|
|
|
:pswitch_2
|
|
sget-object p3, Landroid/text/TextUtils$TruncateAt;->START:Landroid/text/TextUtils$TruncateAt;
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V
|
|
|
|
:goto_0
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_chipIconVisible:I
|
|
|
|
invoke-virtual {p2, p3, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipIconVisible(Z)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string p3, "http://schemas.android.com/apk/res-auto"
|
|
|
|
const-string v1, "chipIconEnabled"
|
|
|
|
invoke-interface {p1, p3, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const-string p3, "http://schemas.android.com/apk/res-auto"
|
|
|
|
const-string v1, "chipIconVisible"
|
|
|
|
invoke-interface {p1, p3, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_chipIconEnabled:I
|
|
|
|
invoke-virtual {p2, p3, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipIconVisible(Z)V
|
|
|
|
:cond_0
|
|
iget-object p3, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget v1, Lcom/google/android/material/R$styleable;->Chip_chipIcon:I
|
|
|
|
invoke-static {p3, p2, v1}, Lcom/google/android/material/resources/MaterialResources;->getDrawable(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipIcon(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
iget-object p3, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget v1, Lcom/google/android/material/R$styleable;->Chip_chipIconTint:I
|
|
|
|
invoke-static {p3, p2, v1}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipIconTint(Landroid/content/res/ColorStateList;)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_chipIconSize:I
|
|
|
|
invoke-virtual {p2, p3, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setChipIconSize(F)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_closeIconVisible:I
|
|
|
|
invoke-virtual {p2, p3, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconVisible(Z)V
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const-string p3, "http://schemas.android.com/apk/res-auto"
|
|
|
|
const-string v1, "closeIconEnabled"
|
|
|
|
invoke-interface {p1, p3, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
const-string p3, "http://schemas.android.com/apk/res-auto"
|
|
|
|
const-string v1, "closeIconVisible"
|
|
|
|
invoke-interface {p1, p3, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
if-nez p3, :cond_1
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_closeIconEnabled:I
|
|
|
|
invoke-virtual {p2, p3, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconVisible(Z)V
|
|
|
|
:cond_1
|
|
iget-object p3, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget v1, Lcom/google/android/material/R$styleable;->Chip_closeIcon:I
|
|
|
|
invoke-static {p3, p2, v1}, Lcom/google/android/material/resources/MaterialResources;->getDrawable(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIcon(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
iget-object p3, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget v1, Lcom/google/android/material/R$styleable;->Chip_closeIconTint:I
|
|
|
|
invoke-static {p3, p2, v1}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconTint(Landroid/content/res/ColorStateList;)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_closeIconSize:I
|
|
|
|
invoke-virtual {p2, p3, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconSize(F)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_android_checkable:I
|
|
|
|
invoke-virtual {p2, p3, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setCheckable(Z)V
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_checkedIconVisible:I
|
|
|
|
invoke-virtual {p2, p3, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lcom/google/android/material/chip/ChipDrawable;->setCheckedIconVisible(Z)V
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const-string p3, "http://schemas.android.com/apk/res-auto"
|
|
|
|
const-string v1, "checkedIconEnabled"
|
|
|
|
invoke-interface {p1, p3, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
const-string p3, "http://schemas.android.com/apk/res-auto"
|
|
|
|
const-string v1, "checkedIconVisible"
|
|
|
|
invoke-interface {p1, p3, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_checkedIconEnabled:I
|
|
|
|
invoke-virtual {p2, p1, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCheckedIconVisible(Z)V
|
|
|
|
:cond_2
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_checkedIcon:I
|
|
|
|
invoke-static {p1, p2, p3}, Lcom/google/android/material/resources/MaterialResources;->getDrawable(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCheckedIcon(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_showMotionSpec:I
|
|
|
|
invoke-static {p1, p2, p3}, Lcom/google/android/material/animation/MotionSpec;->createFromAttribute(Landroid/content/Context;Landroid/content/res/TypedArray;I)Lcom/google/android/material/animation/MotionSpec;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setShowMotionSpec(Lcom/google/android/material/animation/MotionSpec;)V
|
|
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
sget p3, Lcom/google/android/material/R$styleable;->Chip_hideMotionSpec:I
|
|
|
|
invoke-static {p1, p2, p3}, Lcom/google/android/material/animation/MotionSpec;->createFromAttribute(Landroid/content/Context;Landroid/content/res/TypedArray;I)Lcom/google/android/material/animation/MotionSpec;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setHideMotionSpec(Lcom/google/android/material/animation/MotionSpec;)V
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_chipStartPadding:I
|
|
|
|
invoke-virtual {p2, p1, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipStartPadding(F)V
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_iconStartPadding:I
|
|
|
|
invoke-virtual {p2, p1, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setIconStartPadding(F)V
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_iconEndPadding:I
|
|
|
|
invoke-virtual {p2, p1, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setIconEndPadding(F)V
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_textStartPadding:I
|
|
|
|
invoke-virtual {p2, p1, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setTextStartPadding(F)V
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_textEndPadding:I
|
|
|
|
invoke-virtual {p2, p1, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setTextEndPadding(F)V
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_closeIconStartPadding:I
|
|
|
|
invoke-virtual {p2, p1, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconStartPadding(F)V
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_closeIconEndPadding:I
|
|
|
|
invoke-virtual {p2, p1, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconEndPadding(F)V
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_chipEndPadding:I
|
|
|
|
invoke-virtual {p2, p1, v0}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipEndPadding(F)V
|
|
|
|
sget p1, Lcom/google/android/material/R$styleable;->Chip_android_maxWidth:I
|
|
|
|
const p3, 0x7fffffff
|
|
|
|
invoke-virtual {p2, p1, p3}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setMaxWidth(I)V
|
|
|
|
invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
return-void
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method private onStateChange([I[I)Z
|
|
.locals 5
|
|
|
|
invoke-super {p0, p1}, Landroid/graphics/drawable/Drawable;->onStateChange([I)Z
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipBackgroundColor:Landroid/content/res/ColorStateList;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChipBackgroundColor:I
|
|
|
|
invoke-virtual {v1, p1, v3}, Landroid/content/res/ColorStateList;->getColorForState([II)I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
iget v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChipBackgroundColor:I
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-eq v3, v1, :cond_1
|
|
|
|
iput v1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChipBackgroundColor:I
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_1
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeColor:Landroid/content/res/ColorStateList;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
iget v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChipStrokeColor:I
|
|
|
|
invoke-virtual {v1, p1, v3}, Landroid/content/res/ColorStateList;->getColorForState([II)I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
iget v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChipStrokeColor:I
|
|
|
|
if-eq v3, v1, :cond_3
|
|
|
|
iput v1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChipStrokeColor:I
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_3
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->compatRippleColor:Landroid/content/res/ColorStateList;
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
iget v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentCompatRippleColor:I
|
|
|
|
invoke-virtual {v1, p1, v3}, Landroid/content/res/ColorStateList;->getColorForState([II)I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
const/4 v1, 0x0
|
|
|
|
:goto_2
|
|
iget v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentCompatRippleColor:I
|
|
|
|
if-eq v3, v1, :cond_5
|
|
|
|
iput v1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentCompatRippleColor:I
|
|
|
|
iget-boolean v1, p0, Lcom/google/android/material/chip/ChipDrawable;->useCompatRipple:Z
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_5
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textAppearance:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
iget-object v1, v1, Lcom/google/android/material/resources/TextAppearance;->textColor:Landroid/content/res/ColorStateList;
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textAppearance:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
iget-object v1, v1, Lcom/google/android/material/resources/TextAppearance;->textColor:Landroid/content/res/ColorStateList;
|
|
|
|
iget v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentTextColor:I
|
|
|
|
invoke-virtual {v1, p1, v3}, Landroid/content/res/ColorStateList;->getColorForState([II)I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
const/4 v1, 0x0
|
|
|
|
:goto_3
|
|
iget v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentTextColor:I
|
|
|
|
if-eq v3, v1, :cond_7
|
|
|
|
iput v1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentTextColor:I
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_7
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object v1
|
|
|
|
const v3, 0x10100a0
|
|
|
|
invoke-static {v1, v3}, Lcom/google/android/material/chip/ChipDrawable;->hasState([II)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
iget-boolean v1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkable:Z
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_8
|
|
const/4 v1, 0x0
|
|
|
|
:goto_4
|
|
iget-boolean v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChecked:Z
|
|
|
|
if-eq v3, v1, :cond_a
|
|
|
|
iget-object v3, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eqz v3, :cond_a
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v0
|
|
|
|
iput-boolean v1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChecked:Z
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v1
|
|
|
|
cmpl-float v0, v0, v1
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_5
|
|
|
|
:cond_9
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
goto :goto_5
|
|
|
|
:cond_a
|
|
const/4 v1, 0x0
|
|
|
|
:goto_5
|
|
iget-object v3, p0, Lcom/google/android/material/chip/ChipDrawable;->tint:Landroid/content/res/ColorStateList;
|
|
|
|
if-eqz v3, :cond_b
|
|
|
|
iget v2, p0, Lcom/google/android/material/chip/ChipDrawable;->currentTint:I
|
|
|
|
invoke-virtual {v3, p1, v2}, Landroid/content/res/ColorStateList;->getColorForState([II)I
|
|
|
|
move-result v2
|
|
|
|
:cond_b
|
|
iget v3, p0, Lcom/google/android/material/chip/ChipDrawable;->currentTint:I
|
|
|
|
if-eq v3, v2, :cond_c
|
|
|
|
iput v2, p0, Lcom/google/android/material/chip/ChipDrawable;->currentTint:I
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->tint:Landroid/content/res/ColorStateList;
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->tintMode:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
invoke-static {p0, v0, v2}, Lcom/google/android/material/drawable/DrawableUtils;->updateTintFilter(Landroid/graphics/drawable/Drawable;Landroid/content/res/ColorStateList;Landroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->tintFilter:Landroid/graphics/PorterDuffColorFilter;
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_c
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-static {v2}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/graphics/drawable/Drawable;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_d
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v2, p1}, Landroid/graphics/drawable/Drawable;->setState([I)Z
|
|
|
|
move-result v2
|
|
|
|
or-int/2addr v0, v2
|
|
|
|
:cond_d
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-static {v2}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/graphics/drawable/Drawable;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_e
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v2, p1}, Landroid/graphics/drawable/Drawable;->setState([I)Z
|
|
|
|
move-result p1
|
|
|
|
or-int/2addr v0, p1
|
|
|
|
:cond_e
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-static {p1}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/graphics/drawable/Drawable;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_f
|
|
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/graphics/drawable/Drawable;->setState([I)Z
|
|
|
|
move-result p1
|
|
|
|
or-int/2addr v0, p1
|
|
|
|
:cond_f
|
|
if-eqz v0, :cond_10
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_10
|
|
if-eqz v1, :cond_11
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_11
|
|
return v0
|
|
.end method
|
|
|
|
.method private showsCheckedIcon()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIconVisible:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChecked:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private showsChipIcon()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconVisible:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private showsCloseIcon()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconVisible:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private unapplyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
.locals 1
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private updateCompatRippleColor()V
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->useCompatRipple:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rippleColor:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/ripple/RippleUtils;->convertToRippleDrawableColor(Landroid/content/res/ColorStateList;)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->compatRippleColor:Landroid/content/res/ColorStateList;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method calculateChipIconWidth()F
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCheckedIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->iconStartPadding:F
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconSize:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->iconEndPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method calculateTextOriginAndAlignment(Landroid/graphics/Rect;Landroid/graphics/PointF;)Landroid/graphics/Paint$Align;
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p2, v0, v0}, Landroid/graphics/PointF;->set(FF)V
|
|
|
|
sget-object v0, Landroid/graphics/Paint$Align;->LEFT:Landroid/graphics/Paint$Align;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->unicodeWrappedText:Ljava/lang/CharSequence;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStartPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v1
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textStartPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
invoke-static {p0}, Landroidx/core/graphics/drawable/DrawableCompat;->getLayoutDirection(Landroid/graphics/drawable/Drawable;)I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget v1, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
add-float/2addr v1, v0
|
|
|
|
iput v1, p2, Landroid/graphics/PointF;->x:F
|
|
|
|
sget-object v0, Landroid/graphics/Paint$Align;->LEFT:Landroid/graphics/Paint$Align;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget v1, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
iput v1, p2, Landroid/graphics/PointF;->x:F
|
|
|
|
sget-object v0, Landroid/graphics/Paint$Align;->RIGHT:Landroid/graphics/Paint$Align;
|
|
|
|
:goto_0
|
|
invoke-virtual {p1}, Landroid/graphics/Rect;->centerY()I
|
|
|
|
move-result p1
|
|
|
|
int-to-float p1, p1
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateTextCenterFromBaseline()F
|
|
|
|
move-result v1
|
|
|
|
sub-float/2addr p1, v1
|
|
|
|
iput p1, p2, Landroid/graphics/PointF;->y:F
|
|
|
|
:cond_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public draw(Landroid/graphics/Canvas;)V
|
|
.locals 10
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Rect;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getAlpha()I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
iget v2, p0, Lcom/google/android/material/chip/ChipDrawable;->alpha:I
|
|
|
|
const/16 v3, 0xff
|
|
|
|
if-ge v2, v3, :cond_1
|
|
|
|
iget v1, v0, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v5, v1
|
|
|
|
iget v1, v0, Landroid/graphics/Rect;->top:I
|
|
|
|
int-to-float v6, v1
|
|
|
|
iget v1, v0, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float v7, v1
|
|
|
|
iget v1, v0, Landroid/graphics/Rect;->bottom:I
|
|
|
|
int-to-float v8, v1
|
|
|
|
iget v9, p0, Lcom/google/android/material/chip/ChipDrawable;->alpha:I
|
|
|
|
move-object v4, p1
|
|
|
|
invoke-static/range {v4 .. v9}, Lcom/google/android/material/canvas/CanvasCompat;->saveLayerAlpha(Landroid/graphics/Canvas;FFFFI)I
|
|
|
|
move-result v1
|
|
|
|
:cond_1
|
|
invoke-direct {p0, p1, v0}, Lcom/google/android/material/chip/ChipDrawable;->drawChipBackground(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/google/android/material/chip/ChipDrawable;->drawChipStroke(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/google/android/material/chip/ChipDrawable;->drawCompatRipple(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/google/android/material/chip/ChipDrawable;->drawChipIcon(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/google/android/material/chip/ChipDrawable;->drawCheckedIcon(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
|
|
iget-boolean v2, p0, Lcom/google/android/material/chip/ChipDrawable;->shouldDrawText:Z
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/google/android/material/chip/ChipDrawable;->drawText(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
|
|
:cond_2
|
|
invoke-direct {p0, p1, v0}, Lcom/google/android/material/chip/ChipDrawable;->drawCloseIcon(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/google/android/material/chip/ChipDrawable;->drawDebug(Landroid/graphics/Canvas;Landroid/graphics/Rect;)V
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->alpha:I
|
|
|
|
if-ge v0, v3, :cond_3
|
|
|
|
invoke-virtual {p1, v1}, Landroid/graphics/Canvas;->restoreToCount(I)V
|
|
|
|
:cond_3
|
|
return-void
|
|
|
|
:cond_4
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public getAlpha()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->alpha:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getCheckedIcon()Landroid/graphics/drawable/Drawable;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getChipBackgroundColor()Landroid/content/res/ColorStateList;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipBackgroundColor:Landroid/content/res/ColorStateList;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getChipCornerRadius()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipCornerRadius:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getChipEndPadding()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipEndPadding:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getChipIcon()Landroid/graphics/drawable/Drawable;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {v0}, Landroidx/core/graphics/drawable/DrawableCompat;->unwrap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getChipIconSize()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconSize:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getChipIconTint()Landroid/content/res/ColorStateList;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconTint:Landroid/content/res/ColorStateList;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getChipMinHeight()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipMinHeight:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getChipStartPadding()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStartPadding:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getChipStrokeColor()Landroid/content/res/ColorStateList;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeColor:Landroid/content/res/ColorStateList;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getChipStrokeWidth()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeWidth:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getChipTouchBounds(Landroid/graphics/RectF;)V
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipTouchBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getCloseIcon()Landroid/graphics/drawable/Drawable;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {v0}, Landroidx/core/graphics/drawable/DrawableCompat;->unwrap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getCloseIconContentDescription()Ljava/lang/CharSequence;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconContentDescription:Ljava/lang/CharSequence;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getCloseIconEndPadding()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconEndPadding:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getCloseIconSize()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getCloseIconStartPadding()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconStartPadding:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getCloseIconState()[I
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconStateSet:[I
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getCloseIconTint()Landroid/content/res/ColorStateList;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconTint:Landroid/content/res/ColorStateList;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getCloseIconTouchBounds(Landroid/graphics/RectF;)V
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/google/android/material/chip/ChipDrawable;->calculateCloseIconTouchBounds(Landroid/graphics/Rect;Landroid/graphics/RectF;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getColorFilter()Landroid/graphics/ColorFilter;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->colorFilter:Landroid/graphics/ColorFilter;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getEllipsize()Landroid/text/TextUtils$TruncateAt;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->truncateAt:Landroid/text/TextUtils$TruncateAt;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getHideMotionSpec()Lcom/google/android/material/animation/MotionSpec;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->hideMotionSpec:Lcom/google/android/material/animation/MotionSpec;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getIconEndPadding()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->iconEndPadding:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getIconStartPadding()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->iconStartPadding:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getIntrinsicHeight()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipMinHeight:F
|
|
|
|
float-to-int v0, v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getIntrinsicWidth()I
|
|
.locals 2
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStartPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v1
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textStartPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->getTextWidth()F
|
|
|
|
move-result v1
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textEndPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateCloseIconWidth()F
|
|
|
|
move-result v1
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipEndPadding:F
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
invoke-static {v0}, Ljava/lang/Math;->round(F)I
|
|
|
|
move-result v0
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->maxWidth:I
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getMaxWidth()I
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Px;
|
|
.end annotation
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->maxWidth:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getOpacity()I
|
|
.locals 1
|
|
|
|
const/4 v0, -0x3
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getOutline(Landroid/graphics/Outline;)V
|
|
.locals 8
|
|
.param p1 # Landroid/graphics/Outline;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x15
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Rect;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipCornerRadius:F
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/graphics/Outline;->setRoundRect(Landroid/graphics/Rect;F)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getIntrinsicWidth()I
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getIntrinsicHeight()I
|
|
|
|
move-result v6
|
|
|
|
iget v7, p0, Lcom/google/android/material/chip/ChipDrawable;->chipCornerRadius:F
|
|
|
|
move-object v2, p1
|
|
|
|
invoke-virtual/range {v2 .. v7}, Landroid/graphics/Outline;->setRoundRect(IIIIF)V
|
|
|
|
:goto_0
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getAlpha()I
|
|
|
|
move-result v0
|
|
|
|
int-to-float v0, v0
|
|
|
|
const/high16 v1, 0x437f0000 # 255.0f
|
|
|
|
div-float/2addr v0, v1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/Outline;->setAlpha(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getRippleColor()Landroid/content/res/ColorStateList;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rippleColor:Landroid/content/res/ColorStateList;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getShowMotionSpec()Lcom/google/android/material/animation/MotionSpec;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->showMotionSpec:Lcom/google/android/material/animation/MotionSpec;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getText()Ljava/lang/CharSequence;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rawText:Ljava/lang/CharSequence;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getTextAppearance()Lcom/google/android/material/resources/TextAppearance;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textAppearance:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getTextEndPadding()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textEndPadding:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getTextStartPadding()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textStartPadding:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getUseCompatRipple()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->useCompatRipple:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public invalidateDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
.locals 0
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-interface {p1, p0}, Landroid/graphics/drawable/Drawable$Callback;->invalidateDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public isCheckable()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkable:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isCheckedIconEnabled()Z
|
|
.locals 1
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->isCheckedIconVisible()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isCheckedIconVisible()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIconVisible:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isChipIconEnabled()Z
|
|
.locals 1
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->isChipIconVisible()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isChipIconVisible()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconVisible:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isCloseIconEnabled()Z
|
|
.locals 1
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->isCloseIconVisible()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isCloseIconStateful()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/graphics/drawable/Drawable;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isCloseIconVisible()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconVisible:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isStateful()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipBackgroundColor:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/content/res/ColorStateList;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeColor:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/content/res/ColorStateList;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->useCompatRipple:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->compatRippleColor:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/content/res/ColorStateList;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textAppearance:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Lcom/google/android/material/resources/TextAppearance;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->canShowCheckedIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/graphics/drawable/Drawable;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/graphics/drawable/Drawable;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->tint:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/chip/ChipDrawable;->isStateful(Landroid/content/res/ColorStateList;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
|
|
:cond_2
|
|
:goto_0
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onLayoutDirectionChanged(I)Z
|
|
.locals 2
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x17
|
|
.end annotation
|
|
|
|
invoke-super {p0, p1}, Landroid/graphics/drawable/Drawable;->onLayoutDirectionChanged(I)Z
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->setLayoutDirection(I)Z
|
|
|
|
move-result v1
|
|
|
|
or-int/2addr v0, v1
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCheckedIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->setLayoutDirection(I)Z
|
|
|
|
move-result v1
|
|
|
|
or-int/2addr v0, v1
|
|
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->setLayoutDirection(I)Z
|
|
|
|
move-result p1
|
|
|
|
or-int/2addr v0, p1
|
|
|
|
:cond_2
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_3
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method protected onLevelChange(I)Z
|
|
.locals 2
|
|
|
|
invoke-super {p0, p1}, Landroid/graphics/drawable/Drawable;->onLevelChange(I)Z
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->setLevel(I)Z
|
|
|
|
move-result v1
|
|
|
|
or-int/2addr v0, v1
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCheckedIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->setLevel(I)Z
|
|
|
|
move-result v1
|
|
|
|
or-int/2addr v0, v1
|
|
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->setLevel(I)Z
|
|
|
|
move-result p1
|
|
|
|
or-int/2addr v0, p1
|
|
|
|
:cond_2
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_3
|
|
return v0
|
|
.end method
|
|
|
|
.method protected onSizeChange()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->delegate:Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/android/material/chip/ChipDrawable$Delegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0}, Lcom/google/android/material/chip/ChipDrawable$Delegate;->onChipDrawableSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onStateChange([I)Z
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getCloseIconState()[I
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I[I)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public scheduleDrawable(Landroid/graphics/drawable/Drawable;Ljava/lang/Runnable;J)V
|
|
.locals 0
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/Runnable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-interface {p1, p0, p2, p3, p4}, Landroid/graphics/drawable/Drawable$Callback;->scheduleDrawable(Landroid/graphics/drawable/Drawable;Ljava/lang/Runnable;J)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setAlpha(I)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->alpha:I
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->alpha:I
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCheckable(Z)V
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkable:Z
|
|
|
|
if-eq v0, p1, :cond_1
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkable:Z
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
iget-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChecked:Z
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->currentChecked:Z
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
cmpl-float p1, v0, p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCheckableResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/BoolRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getBoolean(I)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCheckable(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCheckedIcon(Landroid/graphics/drawable/Drawable;)V
|
|
.locals 2
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v0
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result p1
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, v1}, Lcom/google/android/material/chip/ChipDrawable;->unapplyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, v1}, Lcom/google/android/material/chip/ChipDrawable;->applyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
cmpl-float p1, v0, p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCheckedIconEnabled(Z)V
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCheckedIconVisible(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCheckedIconEnabledResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/BoolRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getBoolean(I)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCheckedIconVisible(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCheckedIconResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Landroidx/appcompat/content/res/AppCompatResources;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCheckedIcon(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCheckedIconVisible(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/BoolRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getBoolean(I)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCheckedIconVisible(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCheckedIconVisible(Z)V
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIconVisible:Z
|
|
|
|
if-eq v0, p1, :cond_2
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCheckedIcon()Z
|
|
|
|
move-result v0
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIconVisible:Z
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCheckedIcon()Z
|
|
|
|
move-result p1
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->applyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->unapplyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:goto_1
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipBackgroundColor(Landroid/content/res/ColorStateList;)V
|
|
.locals 1
|
|
.param p1 # Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipBackgroundColor:Landroid/content/res/ColorStateList;
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipBackgroundColor:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipBackgroundColorResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/ColorRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Landroidx/appcompat/content/res/AppCompatResources;->getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipBackgroundColor(Landroid/content/res/ColorStateList;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipCornerRadius(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipCornerRadius:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipCornerRadius:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipCornerRadiusResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipCornerRadius(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipEndPadding(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipEndPadding:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipEndPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipEndPaddingResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipEndPadding(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIcon(Landroid/graphics/drawable/Drawable;)V
|
|
.locals 2
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getChipIcon()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
if-eq v0, p1, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-static {p1}, Landroidx/core/graphics/drawable/DrawableCompat;->wrap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result p1
|
|
|
|
invoke-direct {p0, v0}, Lcom/google/android/material/chip/ChipDrawable;->unapplyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, v0}, Lcom/google/android/material/chip/ChipDrawable;->applyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
cmpl-float p1, v1, p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIconEnabled(Z)V
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipIconVisible(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIconEnabledResource(I)V
|
|
.locals 0
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/BoolRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipIconVisible(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIconResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Landroidx/appcompat/content/res/AppCompatResources;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipIcon(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIconSize(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconSize:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconSize:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
cmpl-float p1, v0, p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIconSizeResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipIconSize(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIconTint(Landroid/content/res/ColorStateList;)V
|
|
.locals 1
|
|
.param p1 # Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconTint:Landroid/content/res/ColorStateList;
|
|
|
|
if-eq v0, p1, :cond_1
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconTint:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-static {v0, p1}, Landroidx/core/graphics/drawable/DrawableCompat;->setTintList(Landroid/graphics/drawable/Drawable;Landroid/content/res/ColorStateList;)V
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I)Z
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIconTintResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/ColorRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Landroidx/appcompat/content/res/AppCompatResources;->getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipIconTint(Landroid/content/res/ColorStateList;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIconVisible(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/BoolRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getBoolean(I)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipIconVisible(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipIconVisible(Z)V
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconVisible:Z
|
|
|
|
if-eq v0, p1, :cond_2
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v0
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIconVisible:Z
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result p1
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->applyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->unapplyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:goto_1
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipMinHeight(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipMinHeight:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipMinHeight:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipMinHeightResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipMinHeight(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipStartPadding(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStartPadding:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStartPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipStartPaddingResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipStartPadding(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipStrokeColor(Landroid/content/res/ColorStateList;)V
|
|
.locals 1
|
|
.param p1 # Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeColor:Landroid/content/res/ColorStateList;
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeColor:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipStrokeColorResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/ColorRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Landroidx/appcompat/content/res/AppCompatResources;->getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipStrokeColor(Landroid/content/res/ColorStateList;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipStrokeWidth(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeWidth:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipStrokeWidth:F
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->chipPaint:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/graphics/Paint;->setStrokeWidth(F)V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChipStrokeWidthResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setChipStrokeWidth(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIcon(Landroid/graphics/drawable/Drawable;)V
|
|
.locals 2
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getCloseIcon()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
if-eq v0, p1, :cond_2
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateCloseIconWidth()F
|
|
|
|
move-result v1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-static {p1}, Landroidx/core/graphics/drawable/DrawableCompat;->wrap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateCloseIconWidth()F
|
|
|
|
move-result p1
|
|
|
|
invoke-direct {p0, v0}, Lcom/google/android/material/chip/ChipDrawable;->unapplyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, v0}, Lcom/google/android/material/chip/ChipDrawable;->applyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
cmpl-float p1, v1, p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconContentDescription(Ljava/lang/CharSequence;)V
|
|
.locals 1
|
|
.param p1 # Ljava/lang/CharSequence;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconContentDescription:Ljava/lang/CharSequence;
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
invoke-static {}, Landroidx/core/text/BidiFormatter;->getInstance()Landroidx/core/text/BidiFormatter;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/core/text/BidiFormatter;->unicodeWrap(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconContentDescription:Ljava/lang/CharSequence;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconEnabled(Z)V
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconVisible(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconEnabledResource(I)V
|
|
.locals 0
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/BoolRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconVisible(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconEndPadding(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconEndPadding:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconEndPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconEndPaddingResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconEndPadding(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Landroidx/appcompat/content/res/AppCompatResources;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIcon(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconSize(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconSize:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconSizeResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconSize(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconStartPadding(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconStartPadding:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconStartPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconStartPaddingResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconStartPadding(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconState([I)Z
|
|
.locals 1
|
|
.param p1 # [I
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconStateSet:[I
|
|
|
|
invoke-static {v0, p1}, Ljava/util/Arrays;->equals([I[I)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconStateSet:[I
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I[I)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public setCloseIconTint(Landroid/content/res/ColorStateList;)V
|
|
.locals 1
|
|
.param p1 # Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconTint:Landroid/content/res/ColorStateList;
|
|
|
|
if-eq v0, p1, :cond_1
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconTint:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-static {v0, p1}, Landroidx/core/graphics/drawable/DrawableCompat;->setTintList(Landroid/graphics/drawable/Drawable;Landroid/content/res/ColorStateList;)V
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I)Z
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconTintResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/ColorRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Landroidx/appcompat/content/res/AppCompatResources;->getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconTint(Landroid/content/res/ColorStateList;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconVisible(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/BoolRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getBoolean(I)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setCloseIconVisible(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCloseIconVisible(Z)V
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconVisible:Z
|
|
|
|
if-eq v0, p1, :cond_2
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v0
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIconVisible:Z
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result p1
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->applyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->unapplyChildDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:goto_1
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public setColorFilter(Landroid/graphics/ColorFilter;)V
|
|
.locals 1
|
|
.param p1 # Landroid/graphics/ColorFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->colorFilter:Landroid/graphics/ColorFilter;
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->colorFilter:Landroid/graphics/ColorFilter;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setDelegate(Lcom/google/android/material/chip/ChipDrawable$Delegate;)V
|
|
.locals 1
|
|
.param p1 # Lcom/google/android/material/chip/ChipDrawable$Delegate;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
new-instance v0, Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->delegate:Ljava/lang/ref/WeakReference;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setEllipsize(Landroid/text/TextUtils$TruncateAt;)V
|
|
.locals 0
|
|
.param p1 # Landroid/text/TextUtils$TruncateAt;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->truncateAt:Landroid/text/TextUtils$TruncateAt;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setHideMotionSpec(Lcom/google/android/material/animation/MotionSpec;)V
|
|
.locals 0
|
|
.param p1 # Lcom/google/android/material/animation/MotionSpec;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->hideMotionSpec:Lcom/google/android/material/animation/MotionSpec;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setHideMotionSpecResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/AnimatorRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Lcom/google/android/material/animation/MotionSpec;->createFromResource(Landroid/content/Context;I)Lcom/google/android/material/animation/MotionSpec;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setHideMotionSpec(Lcom/google/android/material/animation/MotionSpec;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setIconEndPadding(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->iconEndPadding:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->iconEndPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
cmpl-float p1, v0, p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setIconEndPaddingResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setIconEndPadding(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setIconStartPadding(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->iconStartPadding:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result v0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->iconStartPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->calculateChipIconWidth()F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
cmpl-float p1, v0, p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setIconStartPaddingResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setIconStartPadding(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setMaxWidth(I)V
|
|
.locals 0
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/Px;
|
|
.end annotation
|
|
.end param
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->maxWidth:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setRippleColor(Landroid/content/res/ColorStateList;)V
|
|
.locals 1
|
|
.param p1 # Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rippleColor:Landroid/content/res/ColorStateList;
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->rippleColor:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->updateCompatRippleColor()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setRippleColorResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/ColorRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Landroidx/appcompat/content/res/AppCompatResources;->getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setRippleColor(Landroid/content/res/ColorStateList;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method setShouldDrawText(Z)V
|
|
.locals 0
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->shouldDrawText:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setShowMotionSpec(Lcom/google/android/material/animation/MotionSpec;)V
|
|
.locals 0
|
|
.param p1 # Lcom/google/android/material/animation/MotionSpec;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->showMotionSpec:Lcom/google/android/material/animation/MotionSpec;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setShowMotionSpecResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/AnimatorRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-static {v0, p1}, Lcom/google/android/material/animation/MotionSpec;->createFromResource(Landroid/content/Context;I)Lcom/google/android/material/animation/MotionSpec;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setShowMotionSpec(Lcom/google/android/material/animation/MotionSpec;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setText(Ljava/lang/CharSequence;)V
|
|
.locals 1
|
|
.param p1 # Ljava/lang/CharSequence;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const-string p1, ""
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->rawText:Ljava/lang/CharSequence;
|
|
|
|
if-eq v0, p1, :cond_1
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->rawText:Ljava/lang/CharSequence;
|
|
|
|
invoke-static {}, Landroidx/core/text/BidiFormatter;->getInstance()Landroidx/core/text/BidiFormatter;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/core/text/BidiFormatter;->unicodeWrap(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->unicodeWrappedText:Ljava/lang/CharSequence;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->textWidthDirty:Z
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextAppearance(Lcom/google/android/material/resources/TextAppearance;)V
|
|
.locals 3
|
|
.param p1 # Lcom/google/android/material/resources/TextAppearance;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textAppearance:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
if-eq v0, p1, :cond_1
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->textAppearance:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->textPaint:Landroid/text/TextPaint;
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/chip/ChipDrawable;->fontCallback:Landroidx/core/content/res/ResourcesCompat$FontCallback;
|
|
|
|
invoke-virtual {p1, v0, v1, v2}, Lcom/google/android/material/resources/TextAppearance;->updateMeasureState(Landroid/content/Context;Landroid/text/TextPaint;Landroidx/core/content/res/ResourcesCompat$FontCallback;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->textWidthDirty:Z
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I)Z
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextAppearanceResource(I)V
|
|
.locals 2
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/StyleRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
new-instance v0, Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-direct {v0, v1, p1}, Lcom/google/android/material/resources/TextAppearance;-><init>(Landroid/content/Context;I)V
|
|
|
|
invoke-virtual {p0, v0}, Lcom/google/android/material/chip/ChipDrawable;->setTextAppearance(Lcom/google/android/material/resources/TextAppearance;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextEndPadding(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textEndPadding:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->textEndPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextEndPaddingResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setTextEndPadding(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextStartPadding(F)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/android/material/chip/ChipDrawable;->textStartPadding:F
|
|
|
|
cmpl-float v0, v0, p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/android/material/chip/ChipDrawable;->textStartPadding:F
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->onSizeChange()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextStartPaddingResource(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->setTextStartPadding(F)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTintList(Landroid/content/res/ColorStateList;)V
|
|
.locals 1
|
|
.param p1 # Landroid/content/res/ColorStateList;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->tint:Landroid/content/res/ColorStateList;
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->tint:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTintMode(Landroid/graphics/PorterDuff$Mode;)V
|
|
.locals 1
|
|
.param p1 # Landroid/graphics/PorterDuff$Mode;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->tintMode:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->tintMode:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/chip/ChipDrawable;->tint:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {p0, v0, p1}, Lcom/google/android/material/drawable/DrawableUtils;->updateTintFilter(Landroid/graphics/drawable/Drawable;Landroid/content/res/ColorStateList;Landroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/chip/ChipDrawable;->tintFilter:Landroid/graphics/PorterDuffColorFilter;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setUseCompatRipple(Z)V
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->useCompatRipple:Z
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
iput-boolean p1, p0, Lcom/google/android/material/chip/ChipDrawable;->useCompatRipple:Z
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->updateCompatRippleColor()V
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getState()[I
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/chip/ChipDrawable;->onStateChange([I)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setVisible(ZZ)Z
|
|
.locals 2
|
|
|
|
invoke-super {p0, p1, p2}, Landroid/graphics/drawable/Drawable;->setVisible(ZZ)Z
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsChipIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->chipIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1, p2}, Landroid/graphics/drawable/Drawable;->setVisible(ZZ)Z
|
|
|
|
move-result v1
|
|
|
|
or-int/2addr v0, v1
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCheckedIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->checkedIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1, p2}, Landroid/graphics/drawable/Drawable;->setVisible(ZZ)Z
|
|
|
|
move-result v1
|
|
|
|
or-int/2addr v0, v1
|
|
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/google/android/material/chip/ChipDrawable;->showsCloseIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/chip/ChipDrawable;->closeIcon:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, p1, p2}, Landroid/graphics/drawable/Drawable;->setVisible(ZZ)Z
|
|
|
|
move-result p1
|
|
|
|
or-int/2addr v0, p1
|
|
|
|
:cond_2
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->invalidateSelf()V
|
|
|
|
:cond_3
|
|
return v0
|
|
.end method
|
|
|
|
.method shouldDrawText()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/google/android/material/chip/ChipDrawable;->shouldDrawText:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public unscheduleDrawable(Landroid/graphics/drawable/Drawable;Ljava/lang/Runnable;)V
|
|
.locals 0
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/Runnable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/chip/ChipDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-interface {p1, p0, p2}, Landroid/graphics/drawable/Drawable$Callback;->unscheduleDrawable(Landroid/graphics/drawable/Drawable;Ljava/lang/Runnable;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|