114 lines
3.2 KiB
Smali
114 lines
3.2 KiB
Smali
.class public final Lcom/discord/views/ChatActionItem;
|
|
.super Landroidx/cardview/widget/CardView;
|
|
.source "ChatActionItem.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public d:Landroid/widget/ImageView;
|
|
|
|
.field public e:Landroid/widget/TextView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 3
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1, p2}, Landroidx/cardview/widget/CardView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f0d0111
|
|
|
|
invoke-static {p1, v0, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a0206
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "findViewById(R.id.chat_action_item_text)"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ChatActionItem;->e:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a0205
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "findViewById(R.id.chat_action_item_image)"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ChatActionItem;->d:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/discord/R$a;->ChatActionItem:[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
|
|
|
|
iget-object p2, p0, Lcom/discord/views/ChatActionItem;->e:Landroid/widget/TextView;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {p1, v2}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p2, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
const p2, 0x7f080144
|
|
|
|
invoke-virtual {p1, v1, p2}, Landroid/content/res/TypedArray;->getResourceId(II)I
|
|
|
|
move-result p2
|
|
|
|
iget-object v1, p0, Lcom/discord/views/ChatActionItem;->d:Landroid/widget/ImageView;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1, p2}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "image"
|
|
|
|
invoke-static {p1}, Lc0/n/c/i;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "primaryText"
|
|
|
|
invoke-static {p1}, Lc0/n/c/i;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|