353 lines
9 KiB
Smali
353 lines
9 KiB
Smali
.class public final Lcom/discord/views/UsernameView;
|
|
.super Landroidx/constraintlayout/widget/ConstraintLayout;
|
|
.source "UsernameView.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic f:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x2
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Lj0/n/c/q;
|
|
|
|
const-class v2, Lcom/discord/views/UsernameView;
|
|
|
|
invoke-static {v2}, Lj0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Lj0/r/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "usernameTextView"
|
|
|
|
const-string v4, "getUsernameTextView()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lj0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lj0/n/c/s;->property1(Lj0/n/c/p;)Lj0/r/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
new-instance v1, Lj0/n/c/q;
|
|
|
|
const-class v2, Lcom/discord/views/UsernameView;
|
|
|
|
invoke-static {v2}, Lj0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Lj0/r/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "tagTextView"
|
|
|
|
const-string v4, "getTagTextView()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lj0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lj0/n/c/s;->property1(Lj0/n/c/p;)Lj0/r/d;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/discord/views/UsernameView;->f:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 3
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-direct {p0, p1, p2}, Landroidx/constraintlayout/widget/ConstraintLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
const p1, 0x7f0a0a18
|
|
|
|
invoke-static {p0, p1}, Lf/n/a/k/a;->h(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/views/UsernameView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a0a17
|
|
|
|
invoke-static {p0, p1}, Lf/n/a/k/a;->h(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/views/UsernameView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
invoke-virtual {p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f0d0143
|
|
|
|
invoke-static {p1, v0, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/discord/R$a;->UsernameView:[I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p1, p2, v0, v1, v1}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p1
|
|
|
|
:try_start_0
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getUsernameTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/res/TypedArray;->getText(I)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p2, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getUsernameTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-virtual {p1, v2, v0}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p2, v0}, Landroid/widget/TextView;->setSingleLine(Z)V
|
|
|
|
const/4 p2, 0x3
|
|
|
|
invoke-virtual {p1, p2, v1}, Landroid/content/res/TypedArray;->getResourceId(II)I
|
|
|
|
move-result p2
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getUsernameTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, p2}, Landroidx/core/widget/TextViewCompat;->setTextAppearance(Landroid/widget/TextView;I)V
|
|
|
|
const/4 p2, 0x4
|
|
|
|
const v0, 0x7f0701f5
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getResourceId(II)I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p0}, Landroid/view/ViewGroup;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p2}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p2
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getUsernameTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1, p2}, Landroid/widget/TextView;->setTextSize(IF)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getTagTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, v1}, Landroid/content/res/TypedArray;->getText(I)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p2
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
throw p2
|
|
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private final getTagTextView()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/UsernameView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/UsernameView;->f:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getUsernameTextView()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/UsernameView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/UsernameView;->f:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final setIsVerified(Z)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const p1, 0x7f080454
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getTagTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p1, v0, v0, v0}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(IIII)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(ZIZ)V
|
|
.locals 1
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getTagTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getTagTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(I)V
|
|
|
|
invoke-direct {p0, p3}, Lcom/discord/views/UsernameView;->setIsVerified(Z)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getTagTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 p2, 0x8
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setUsernameColor(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getUsernameTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setTextColor(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setUsernameText(Ljava/lang/CharSequence;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/UsernameView;->getUsernameTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "usernameText"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|