261 lines
11 KiB
Java
261 lines
11 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.widget.ImageView;
|
||
|
import android.widget.LinearLayout;
|
||
|
import android.widget.TextView;
|
||
|
import androidx.appcompat.widget.AppCompatTextView;
|
||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||
|
import androidx.constraintlayout.widget.Guideline;
|
||
|
import androidx.recyclerview.widget.RecyclerView;
|
||
|
import com.bumptech.glide.Glide;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
|
||
|
/* renamed from: o.exI, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class C12386exI extends RecyclerView.Sts<RecyclerView.zJl> {
|
||
|
public List<UA> a;
|
||
|
public int b;
|
||
|
public UA c;
|
||
|
public RVV e;
|
||
|
|
||
|
/* renamed from: o.exI$RVV */
|
||
|
/* loaded from: classes5.dex */
|
||
|
public interface RVV {
|
||
|
void a(UA ua, ArrayList<String> arrayList);
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.exI$LWm */
|
||
|
/* loaded from: classes5.dex */
|
||
|
public static final class LWm {
|
||
|
private LWm() {
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ LWm(byte b) {
|
||
|
this();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||
|
C14957gcv.e(viewGroup, "");
|
||
|
Context context = viewGroup.getContext();
|
||
|
if (i == 0) {
|
||
|
View inflate = LayoutInflater.from(context).inflate(com.scb.phone.R.layout.2131560038, viewGroup, false);
|
||
|
TextView textView = (TextView) qeC.e(inflate, com.scb.phone.R.id.tvTitleWallet);
|
||
|
if (textView != null) {
|
||
|
OGq oGq = new OGq((LinearLayout) inflate, textView);
|
||
|
C14957gcv.c(oGq, "");
|
||
|
return new C12396exS(oGq);
|
||
|
}
|
||
|
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(com.scb.phone.R.id.tvTitleWallet)));
|
||
|
}
|
||
|
int i2 = com.scb.phone.R.id.guideline2;
|
||
|
if (i == 1) {
|
||
|
View inflate2 = LayoutInflater.from(context).inflate(com.scb.phone.R.layout.2131560037, viewGroup, false);
|
||
|
Guideline guideline = (Guideline) qeC.e(inflate2, com.scb.phone.R.id.guideline2);
|
||
|
if (guideline != null) {
|
||
|
i2 = com.scb.phone.R.id.icThbFlag;
|
||
|
ImageView imageView = (ImageView) qeC.e(inflate2, com.scb.phone.R.id.icThbFlag);
|
||
|
if (imageView != null) {
|
||
|
i2 = com.scb.phone.R.id.tvThb;
|
||
|
AppCompatTextView appCompatTextView = (AppCompatTextView) qeC.e(inflate2, com.scb.phone.R.id.tvThb);
|
||
|
if (appCompatTextView != null) {
|
||
|
i2 = com.scb.phone.R.id.tvThbAmount;
|
||
|
AppCompatTextView appCompatTextView2 = (AppCompatTextView) qeC.e(inflate2, com.scb.phone.R.id.tvThbAmount);
|
||
|
if (appCompatTextView2 != null) {
|
||
|
i2 = com.scb.phone.R.id.tvThbName;
|
||
|
AppCompatTextView appCompatTextView3 = (AppCompatTextView) qeC.e(inflate2, com.scb.phone.R.id.tvThbName);
|
||
|
if (appCompatTextView3 != null) {
|
||
|
Cbo cbo = new Cbo((ConstraintLayout) inflate2, guideline, imageView, appCompatTextView, appCompatTextView2, appCompatTextView3);
|
||
|
C14957gcv.c(cbo, "");
|
||
|
return new C12397exT(cbo);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
throw new NullPointerException("Missing required view with ID: ".concat(inflate2.getResources().getResourceName(i2)));
|
||
|
}
|
||
|
if (i != 2) {
|
||
|
View inflate3 = LayoutInflater.from(context).inflate(com.scb.phone.R.layout.2131560036, viewGroup, false);
|
||
|
int i3 = com.scb.phone.R.id.card_empty_state_content;
|
||
|
TextView textView2 = (TextView) qeC.e(inflate3, com.scb.phone.R.id.card_empty_state_content);
|
||
|
if (textView2 != null) {
|
||
|
i3 = com.scb.phone.R.id.card_empty_state_image;
|
||
|
ImageView imageView2 = (ImageView) qeC.e(inflate3, com.scb.phone.R.id.card_empty_state_image);
|
||
|
if (imageView2 != null) {
|
||
|
Lva lva = new Lva((ConstraintLayout) inflate3, textView2, imageView2);
|
||
|
C14957gcv.c(lva, "");
|
||
|
return new C12387exJ(lva);
|
||
|
}
|
||
|
}
|
||
|
throw new NullPointerException("Missing required view with ID: ".concat(inflate3.getResources().getResourceName(i3)));
|
||
|
}
|
||
|
View inflate4 = LayoutInflater.from(context).inflate(com.scb.phone.R.layout.2131560035, viewGroup, false);
|
||
|
Guideline guideline2 = (Guideline) qeC.e(inflate4, com.scb.phone.R.id.guideline2);
|
||
|
if (guideline2 != null) {
|
||
|
i2 = com.scb.phone.R.id.guideline3;
|
||
|
Guideline guideline3 = (Guideline) qeC.e(inflate4, com.scb.phone.R.id.guideline3);
|
||
|
if (guideline3 != null) {
|
||
|
i2 = com.scb.phone.R.id.ic_arrow;
|
||
|
ImageView imageView3 = (ImageView) qeC.e(inflate4, com.scb.phone.R.id.ic_arrow);
|
||
|
if (imageView3 != null) {
|
||
|
i2 = com.scb.phone.R.id.icOtherCurrencyFlag;
|
||
|
ImageView imageView4 = (ImageView) qeC.e(inflate4, com.scb.phone.R.id.icOtherCurrencyFlag);
|
||
|
if (imageView4 != null) {
|
||
|
i2 = com.scb.phone.R.id.tvOtherCurrency;
|
||
|
AppCompatTextView appCompatTextView4 = (AppCompatTextView) qeC.e(inflate4, com.scb.phone.R.id.tvOtherCurrency);
|
||
|
if (appCompatTextView4 != null) {
|
||
|
i2 = com.scb.phone.R.id.tvOtherCurrencyAmount;
|
||
|
AppCompatTextView appCompatTextView5 = (AppCompatTextView) qeC.e(inflate4, com.scb.phone.R.id.tvOtherCurrencyAmount);
|
||
|
if (appCompatTextView5 != null) {
|
||
|
i2 = com.scb.phone.R.id.tvOtherCurrencyName;
|
||
|
AppCompatTextView appCompatTextView6 = (AppCompatTextView) qeC.e(inflate4, com.scb.phone.R.id.tvOtherCurrencyName);
|
||
|
if (appCompatTextView6 != null) {
|
||
|
i2 = com.scb.phone.R.id.viewLine;
|
||
|
View e = qeC.e(inflate4, com.scb.phone.R.id.viewLine);
|
||
|
if (e != null) {
|
||
|
Gxs gxs = new Gxs((ConstraintLayout) inflate4, guideline2, guideline3, imageView3, imageView4, appCompatTextView4, appCompatTextView5, appCompatTextView6, e);
|
||
|
C14957gcv.c(gxs, "");
|
||
|
RVV rvv = this.e;
|
||
|
if (rvv == null) {
|
||
|
C14957gcv.a("");
|
||
|
rvv = null;
|
||
|
}
|
||
|
return new C12388exK(gxs, rvv);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
throw new NullPointerException("Missing required view with ID: ".concat(inflate4.getResources().getResourceName(i2)));
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final void onBindViewHolder(RecyclerView.zJl zjl, int i) {
|
||
|
C14957gcv.e(zjl, "");
|
||
|
if (zjl instanceof C12396exS) {
|
||
|
OGq oGq = ((C12396exS) zjl).d;
|
||
|
if (i == 0) {
|
||
|
oGq.b.setText(oGq.b.getContext().getString(com.scb.phone.R.string.prepaid_travel_wallet_thb_wallet));
|
||
|
return;
|
||
|
} else {
|
||
|
if (i == 2) {
|
||
|
oGq.b.setText(oGq.b.getContext().getString(com.scb.phone.R.string.prepaid_travel_wallet_other_currency_wallet));
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
UA ua = null;
|
||
|
List<UA> list = null;
|
||
|
if (zjl instanceof C12397exT) {
|
||
|
C12397exT c12397exT = (C12397exT) zjl;
|
||
|
List<UA> list2 = this.a;
|
||
|
if (list2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
} else {
|
||
|
list = list2;
|
||
|
}
|
||
|
UA ua2 = (UA) C14881gav.e((List) list);
|
||
|
C14957gcv.e(ua2, "");
|
||
|
Cbo cbo = c12397exT.c;
|
||
|
Glide.e(cbo.c.getContext()).c(ua2.h).Dq_(cbo.c);
|
||
|
cbo.a.setText(ua2.e);
|
||
|
cbo.e.setText(ua2.e);
|
||
|
cbo.b.setText(ua2.b);
|
||
|
return;
|
||
|
}
|
||
|
if (zjl instanceof C12388exK) {
|
||
|
final C12388exK c12388exK = (C12388exK) zjl;
|
||
|
List<UA> list3 = this.a;
|
||
|
if (list3 == null) {
|
||
|
C14957gcv.a("");
|
||
|
list3 = null;
|
||
|
}
|
||
|
final UA ua3 = list3.get(i - 2);
|
||
|
UA ua4 = this.c;
|
||
|
if (ua4 == null) {
|
||
|
C14957gcv.a("");
|
||
|
} else {
|
||
|
ua = ua4;
|
||
|
}
|
||
|
final List<String> list4 = ua.a;
|
||
|
C14957gcv.e(ua3, "");
|
||
|
C14957gcv.e(list4, "");
|
||
|
Gxs gxs = c12388exK.d;
|
||
|
Glide.e(gxs.b.getContext()).c(ua3.h).b(new PNS().c(com.scb.phone.R.color.f3412131099849)).Dq_(gxs.b);
|
||
|
gxs.c.setText(ua3.e);
|
||
|
gxs.e.setText(ua3.e);
|
||
|
gxs.a.setText(ua3.b);
|
||
|
c12388exK.itemView.setOnClickListener(new View.OnClickListener(c12388exK, ua3, list4) { // from class: o.exQ
|
||
|
private UA a;
|
||
|
private List b;
|
||
|
private C12388exK d;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
C12388exK.c(this.d, this.a, this.b);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = c12388exK;
|
||
|
this.a = ua3;
|
||
|
this.b = list4;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final int getItemViewType(int i) {
|
||
|
if (i != 0) {
|
||
|
if (i == 1) {
|
||
|
return 1;
|
||
|
}
|
||
|
if (i != 2) {
|
||
|
return a() ? 3 : 2;
|
||
|
}
|
||
|
}
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
public final boolean a() {
|
||
|
List<UA> list = this.a;
|
||
|
List<UA> list2 = null;
|
||
|
if (list == null) {
|
||
|
C14957gcv.a("");
|
||
|
list = null;
|
||
|
}
|
||
|
if (list.size() == 1) {
|
||
|
List<UA> list3 = this.a;
|
||
|
if (list3 == null) {
|
||
|
C14957gcv.a("");
|
||
|
} else {
|
||
|
list2 = list3;
|
||
|
}
|
||
|
if (((UA) C14881gav.e((List) list2)).j == 0) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final int getItemCount() {
|
||
|
return this.b;
|
||
|
}
|
||
|
|
||
|
static {
|
||
|
new LWm((byte) 0);
|
||
|
}
|
||
|
}
|