what-the-bank/sources/o/C12086era.java

116 lines
4.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.huawei.hms.android.HwBuildEx;
import com.scb.phone.view.custom.common.CustomHorizontalProgressBar;
import java.util.ArrayList;
import java.util.List;
/* renamed from: o.era, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C12086era extends WYJ {
private Context b;
public InterfaceC12826fIa c;
private LayoutInflater d;
private List<C0390Fm> e;
@Override // o.WYJ
public final boolean isViewFromObject(View view, Object obj) {
return view == obj;
}
public C12086era(Context context, List<C0390Fm> list) {
this.d = (LayoutInflater) context.getSystemService("layout_inflater");
this.b = context;
this.e = list == null ? new ArrayList<>() : list;
}
@Override // o.WYJ
public final Object instantiateItem(ViewGroup viewGroup, final int i) {
View view;
C0390Fm c0390Fm = this.e.get(i);
if (!c0390Fm.e) {
view = this.d.inflate(com.scb.phone.R.layout.2131559016, (ViewGroup) null);
} else {
final C12030eqX c12030eqX = new C12030eqX(HkB.QV_(LayoutInflater.from(this.b)), this.c);
C14957gcv.e(c0390Fm, "");
HkB hkB = c12030eqX.d;
C12891fKc.azt_(nMh.getDrawable(hkB.i.getContext(), com.scb.phone.R.drawable.ic_loan_default), hkB.i, c0390Fm.w);
hkB.m.setText(c0390Fm.a);
hkB.f.setText(c0390Fm.c);
hkB.d.setVisibility(8);
hkB.l.setVisibility(0);
hkB.l.setUsedTitle(c0390Fm.s);
hkB.l.setAvailableTitle(c0390Fm.z);
hkB.l.setUsedValue(c0390Fm.m);
hkB.l.setAvailableValue(c0390Fm.D);
hkB.l.setProgressBarDrawable(nMh.getDrawable(hkB.l.getContext(), com.scb.phone.R.drawable.card_red_yellow_progress_bar));
hkB.l.setProgressMax(HwBuildEx.VersionCodes.CUR_DEVELOPMENT);
CustomHorizontalProgressBar customHorizontalProgressBar = hkB.l;
Integer num = c0390Fm.r;
C14957gcv.c(num, "");
customHorizontalProgressBar.setProgressBar(num.intValue());
CustomHorizontalProgressBar customHorizontalProgressBar2 = hkB.l;
Integer num2 = c0390Fm.y;
C14957gcv.c(num2, "");
customHorizontalProgressBar2.setSecondaryProgressBar(num2.intValue());
hkB.l.mTotalContainerLinearLayout.setVisibility(8);
if (C14957gcv.b((Object) c0390Fm.x, (Object) "PN")) {
hkB.l.setUsedValueColor(nMh.getColor(hkB.l.getContext(), com.scb.phone.R.color.f13582131100866));
} else {
hkB.l.setUsedValueColor(nMh.getColor(hkB.l.getContext(), com.scb.phone.R.color.f14022131100910));
}
if (c0390Fm.q) {
hkB.n.setVisibility(8);
hkB.k.setVisibility(8);
hkB.c.setVisibility(0);
hkB.g.getContext();
C12891fKc.azn_(nMh.getDrawable(hkB.g.getContext(), com.scb.phone.R.drawable.ic_loan_default), hkB.g, c0390Fm.d);
hkB.q.setText(c0390Fm.t);
} else {
hkB.c.setVisibility(8);
hkB.n.setVisibility(0);
hkB.n.setText(c0390Fm.g);
hkB.k.setVisibility(0);
hkB.k.setText(c0390Fm.i);
}
hkB.r.setOnClickListener(new View.OnClickListener(c12030eqX, i) { // from class: o.erb
private int c;
private C12030eqX d;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
C12030eqX c12030eqX2 = this.d;
int i2 = this.c;
C14957gcv.e(c12030eqX2, "");
InterfaceC12826fIa interfaceC12826fIa = c12030eqX2.e;
if (interfaceC12826fIa != null) {
interfaceC12826fIa.a(i2);
}
}
{
this.d = c12030eqX;
this.c = i;
}
});
view = c12030eqX.a;
}
viewGroup.addView(view, 0);
return view;
}
@Override // o.WYJ
public final int getCount() {
return this.e.size();
}
@Override // o.WYJ
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
viewGroup.removeView((View) obj);
}
}