240 lines
6.7 KiB
Smali
240 lines
6.7 KiB
Smali
.class public final Lcom/discord/views/ChatActionItem;
|
|
.super Landroid/widget/RelativeLayout;
|
|
.source "ChatActionItem.kt"
|
|
|
|
|
|
# instance fields
|
|
.field private yd:Landroid/widget/ImageView;
|
|
|
|
.field private ye:Lcom/discord/app/AppTextView;
|
|
|
|
.field private yf:Lcom/discord/app/AppTextView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
invoke-direct {p0, p2}, Lcom/discord/views/ChatActionItem;->a(Landroid/util/AttributeSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 1
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
invoke-direct {p0, p2}, Lcom/discord/views/ChatActionItem;->a(Landroid/util/AttributeSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p4, 0x2
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_1
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/views/ChatActionItem;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/views/ChatActionItem;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final a(Landroid/util/AttributeSet;)V
|
|
.locals 4
|
|
|
|
invoke-virtual {p0}, Lcom/discord/views/ChatActionItem;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v1, p0
|
|
|
|
check-cast v1, Landroid/view/ViewGroup;
|
|
|
|
const v2, 0x7f0d0070
|
|
|
|
invoke-static {v0, v2, v1}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const v0, 0x7f0a0162
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/views/ChatActionItem;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "findViewById(R.id.chat_action_item_text)"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast v0, Lcom/discord/app/AppTextView;
|
|
|
|
iput-object v0, p0, Lcom/discord/views/ChatActionItem;->ye:Lcom/discord/app/AppTextView;
|
|
|
|
const v0, 0x7f0a0161
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/views/ChatActionItem;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "findViewById(R.id.chat_action_item_subtext)"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast v0, Lcom/discord/app/AppTextView;
|
|
|
|
iput-object v0, p0, Lcom/discord/views/ChatActionItem;->yf:Lcom/discord/app/AppTextView;
|
|
|
|
const v0, 0x7f0a0160
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/views/ChatActionItem;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "findViewById(R.id.chat_action_item_image)"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast v0, Landroid/widget/ImageView;
|
|
|
|
iput-object v0, p0, Lcom/discord/views/ChatActionItem;->yd:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/views/ChatActionItem;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/R$a;->ChatActionItem:[I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0, p1, v1, v2, v2}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/discord/views/ChatActionItem;->ye:Lcom/discord/app/AppTextView;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v1, "primaryText"
|
|
|
|
invoke-static {v1}, Lkotlin/jvm/internal/j;->dz(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
const/4 v1, 0x3
|
|
|
|
invoke-virtual {p1, v1}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
new-array v3, v2, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v0, v1, v3}, Lcom/discord/app/AppTextView;->g(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/views/ChatActionItem;->yf:Lcom/discord/app/AppTextView;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v1, "subtext"
|
|
|
|
invoke-static {v1}, Lkotlin/jvm/internal/j;->dz(Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
const/4 v1, 0x2
|
|
|
|
invoke-virtual {p1, v1}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
new-array v3, v2, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v0, v1, v3}, Lcom/discord/app/AppTextView;->g(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const v1, 0x7f0800ee
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/content/res/TypedArray;->getResourceId(II)I
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lcom/discord/views/ChatActionItem;->yd:Landroid/widget/ImageView;
|
|
|
|
const-string v3, "image"
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
invoke-static {v3}, Lkotlin/jvm/internal/j;->dz(Ljava/lang/String;)V
|
|
|
|
:cond_2
|
|
invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
const/4 v0, -0x1
|
|
|
|
invoke-virtual {p1, v2, v0}, Landroid/content/res/TypedArray;->getResourceId(II)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/views/ChatActionItem;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1, v0}, Landroidx/appcompat/content/res/AppCompatResources;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
iget-object v1, p0, Lcom/discord/views/ChatActionItem;->yd:Landroid/widget/ImageView;
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
invoke-static {v3}, Lkotlin/jvm/internal/j;->dz(Ljava/lang/String;)V
|
|
|
|
:cond_3
|
|
invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setBackground(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_4
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
return-void
|
|
.end method
|