what-the-bank/sources/com/scb/phone/view/custom/easycash/CustomInfoItem.java

101 lines
3.2 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.easycash;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import java.util.List;
import o.AgY;
import o.IV;
import o.InterfaceC13391fZD;
import o.lUI;
/* loaded from: classes5.dex */
public class CustomInfoItem extends RelativeLayout {
@BindView
LinearLayout infoDetails;
@BindView
TextView tvItemBottom;
@BindView
TextView tvItemLeft;
@BindView
TextView tvItemRight;
@InterfaceC13391fZD
lUI useCase;
public CustomInfoItem(Context context, IV iv) {
super(context);
View inflate;
LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService("layout_inflater");
if ("hml".equals(iv.a)) {
layoutInflater.inflate(R.layout.2131560011, (ViewGroup) this, true);
} else {
layoutInflater.inflate(R.layout.2131560022, (ViewGroup) this, true);
}
ButterKnife.c(this);
this.tvItemLeft.setText(iv.h);
this.tvItemRight.setText(iv.i);
String str = iv.d;
int i = iv.f;
if (i != 0) {
this.tvItemRight.setTextColor(i);
}
int i2 = iv.g;
if (i2 != 0) {
this.tvItemLeft.setTextColor(i2);
}
int i3 = iv.j;
if (i3 != 0) {
this.tvItemRight.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, (Drawable) null, AgY.dT_(getContext(), i3), (Drawable) null);
this.tvItemRight.setCompoundDrawablePadding(8);
}
if (iv.e.booleanValue()) {
this.infoDetails.setVisibility(8);
} else {
this.infoDetails.setVisibility(0);
}
if (str != null && !str.isEmpty()) {
this.tvItemBottom.setText(str);
this.tvItemBottom.setVisibility(0);
return;
}
if (iv.b == null || iv.b.isEmpty()) {
return;
}
List<IV.Sts> list = iv.b;
String str2 = iv.a;
for (IV.Sts sts : list) {
if ("normal".equals(sts.e)) {
if ("hml".equals(str2)) {
inflate = inflate(this.infoDetails.getContext(), R.layout.2131560012, null);
} else {
inflate = inflate(this.infoDetails.getContext(), R.layout.2131560023, null);
}
this.infoDetails.addView(inflate);
TextView textView = (TextView) inflate.findViewById(R.id.detail_text);
textView.setText(sts.b);
textView.setTextSize(sts.c);
if (sts.d != 0) {
textView.setTextColor(sts.d);
}
} else {
View inflate2 = inflate(this.infoDetails.getContext(), R.layout.2131560024, null);
this.infoDetails.addView(inflate2);
((TextView) inflate2.findViewById(R.id.detail_text)).setText(sts.b);
}
}
}
}