discord-jadx/app/src/main/java/com/discord/views/ChatActionItem.java

43 lines
1.9 KiB
Java

package com.discord.views;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import c.a.i.r1;
import com.discord.R;
import d0.z.d.m;
/* compiled from: ChatActionItem.kt */
public final class ChatActionItem extends CardView {
public final r1 i;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ChatActionItem(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
m.checkNotNullParameter(context, "context");
LayoutInflater.from(getContext()).inflate(2131558733, this);
int i = 2131362465;
ImageView imageView = (ImageView) findViewById(2131362465);
if (imageView != null) {
i = 2131362467;
TextView textView = (TextView) findViewById(2131362467);
if (textView != null) {
r1 r1Var = new r1(this, imageView, textView);
m.checkNotNullExpressionValue(r1Var, "ViewChatActionItemBindin…ater.from(context), this)");
this.i = r1Var;
TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, R.a.ChatActionItem, 0, 0);
m.checkNotNullExpressionValue(obtainStyledAttributes, "context.obtainStyledAttr…hatActionItem, 0, 0\n )");
m.checkNotNullExpressionValue(textView, "binding.chatActionItemText");
textView.setText(obtainStyledAttributes.getString(1));
imageView.setImageResource(obtainStyledAttributes.getResourceId(0, 2131231097));
obtainStyledAttributes.recycle();
return;
}
}
throw new NullPointerException("Missing required view with ID: ".concat(getResources().getResourceName(i)));
}
}