what-the-bank/sources/com/scb/phone/view/custom/common/CustomInfoItemWithImage.java

96 lines
3.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.common;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import o.AbstractC10391eCr;
import o.C12891fKc;
import o.C14866gag;
import o.C14957gcv;
import o.InterfaceC14894gbR;
import o.nMh;
/* loaded from: classes5.dex */
public final class CustomInfoItemWithImage extends ConstraintLayout {
@BindView
public ImageView ivLeftImage;
@BindView
public TextView tvRightText;
private /* synthetic */ CustomInfoItemWithImage(Context context) {
this(context, (AttributeSet) null, 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CustomInfoItemWithImage(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
C14957gcv.e(context, "");
}
public /* synthetic */ CustomInfoItemWithImage(Context context, AbstractC10391eCr abstractC10391eCr, String str) {
this(context, abstractC10391eCr, str, (byte) 0);
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
private CustomInfoItemWithImage(Context context, AbstractC10391eCr abstractC10391eCr, String str, byte b) {
this(context);
C14957gcv.e(context, "");
C14957gcv.e(abstractC10391eCr, "");
C14957gcv.e(str, "");
LayoutInflater.from(getContext()).inflate(R.layout.2131559043, (ViewGroup) this, true);
ButterKnife.c(this);
TextView textView = null;
if (abstractC10391eCr instanceof AbstractC10391eCr.Sts) {
ImageView imageView = this.ivLeftImage;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
C12891fKc.aze_(R.drawable.bankicon_place_holder, imageView, ((AbstractC10391eCr.Sts) abstractC10391eCr).a);
} else if (abstractC10391eCr instanceof AbstractC10391eCr.HBt) {
ImageView imageView2 = this.ivLeftImage;
if (imageView2 == null) {
C14957gcv.a("");
imageView2 = null;
}
imageView2.setImageDrawable(nMh.getDrawable(getContext(), ((AbstractC10391eCr.HBt) abstractC10391eCr).e));
}
TextView textView2 = this.tvRightText;
if (textView2 != null) {
textView = textView2;
} else {
C14957gcv.a("");
}
textView.setText(str);
}
public final void b(InterfaceC14894gbR<? super TextView, C14866gag> interfaceC14894gbR) {
C14957gcv.e(interfaceC14894gbR, "");
TextView textView = this.tvRightText;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
interfaceC14894gbR.invoke(textView);
}
public final void setTvRightText(TextView textView) {
C14957gcv.e(textView, "");
this.tvRightText = textView;
}
public final void setIvLeftImage(ImageView imageView) {
C14957gcv.e(imageView, "");
this.ivLeftImage = imageView;
}
}