2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/utilities/color/ColorCompatKt;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "ColorCompat.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static final setDrawableColor(Landroid/widget/TextView;I)V
|
|
|
|
.locals 3
|
|
|
|
.param p1 # I
|
|
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "$this$setDrawableColor"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p0, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/TextView;->getCompoundDrawables()[Landroid/graphics/drawable/Drawable;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-string v0, "compoundDrawables"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p0, v0}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-03 03:03:24 +00:00
|
|
|
invoke-static {p0}, Lf/h/a/f/f/n/f;->filterNotNull([Ljava/lang/Object;)Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroid/graphics/drawable/Drawable;
|
|
|
|
|
|
|
|
new-instance v1, Landroid/graphics/PorterDuffColorFilter;
|
|
|
|
|
|
|
|
sget-object v2, Landroid/graphics/PorterDuff$Mode;->SRC_IN:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1, v2}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final setTint(Landroid/graphics/drawable/Drawable;IZ)V
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
.param p1 # I
|
|
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "$this$setTint"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p0, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable;
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-static {p0, p1}, Landroidx/core/graphics/drawable/DrawableCompat;->setTint(Landroid/graphics/drawable/Drawable;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic setTint$default(Landroid/graphics/drawable/Drawable;IZILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/utilities/color/ColorCompatKt;->setTint(Landroid/graphics/drawable/Drawable;IZ)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final tintWithColor(Landroid/widget/ImageView;I)V
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "$this$tintWithColor"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p0, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p1}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/ImageView;->setImageTintList(Landroid/content/res/ColorStateList;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final tintWithColorResource(Landroid/widget/ImageView;I)V
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 1
|
2020-09-09 19:21:20 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "$this$tintWithColorResource"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p0, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p0, p1}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/view/View;I)I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
invoke-static {p0, p1}, Lcom/discord/utilities/color/ColorCompatKt;->tintWithColor(Landroid/widget/ImageView;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|