what-the-bank/sources/com/scb/phone/view/adapter/accountsummary/PrepaidViewPagerAdapter.java

221 lines
7.8 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.accountsummary;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import com.scb.phone.R;
import com.scb.phone.view.adapter.accountsummary.PrepaidViewPagerAdapter;
import com.squareup.picasso.Picasso;
import java.util.List;
import o.C1049Un;
import o.C13020fOa;
import o.C14957gcv;
import o.EnumC12984fNP;
import o.WYJ;
import o.pyT;
/* loaded from: classes5.dex */
public final class PrepaidViewPagerAdapter extends WYJ {
public final List<C1049Un> a;
private final IeS b;
private final Context c;
/* loaded from: classes5.dex */
public interface IeS {
void d(int i);
}
/* loaded from: classes5.dex */
public final class TransactionItemViewHolder_ViewBinding implements Unbinder {
private TransactionItemViewHolder c;
public TransactionItemViewHolder_ViewBinding(TransactionItemViewHolder transactionItemViewHolder, View view) {
this.c = transactionItemViewHolder;
transactionItemViewHolder.tvCreditCardReferenceName = (TextView) pyT.e(view, R.id.tv_credit_card_reference_name, "field 'tvCreditCardReferenceName'", TextView.class);
transactionItemViewHolder.ivCardArt = (ImageView) pyT.e(view, R.id.iv_card_art, "field 'ivCardArt'", ImageView.class);
transactionItemViewHolder.tvCardNumber = (TextView) pyT.e(view, R.id.tv_card_number, "field 'tvCardNumber'", TextView.class);
transactionItemViewHolder.tvTapViewModeDetail = (TextView) pyT.e(view, R.id.tv_tap_view_more_detail, "field 'tvTapViewModeDetail'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
TransactionItemViewHolder transactionItemViewHolder = this.c;
if (transactionItemViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
transactionItemViewHolder.tvCreditCardReferenceName = null;
transactionItemViewHolder.ivCardArt = null;
transactionItemViewHolder.tvCardNumber = null;
transactionItemViewHolder.tvTapViewModeDetail = null;
}
}
public PrepaidViewPagerAdapter(Context context, List<C1049Un> list, IeS ieS) {
C14957gcv.e(context, "");
C14957gcv.e(list, "");
C14957gcv.e(ieS, "");
this.c = context;
this.a = list;
this.b = ieS;
}
@Override // o.WYJ
public final int getCount() {
return this.a.size();
}
@Override // o.WYJ
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
C14957gcv.e(viewGroup, "");
C14957gcv.e(obj, "");
viewGroup.removeView((View) obj);
}
@Override // o.WYJ
public final Object instantiateItem(ViewGroup viewGroup, final int i) {
View view;
C14957gcv.e(viewGroup, "");
C1049Un c1049Un = this.a.get(i);
if (!c1049Un.e) {
view = LayoutInflater.from(this.c).inflate(R.layout.2131559016, viewGroup, false);
C14957gcv.c(view, "");
} else {
View inflate = LayoutInflater.from(this.c).inflate(R.layout.2131559202, viewGroup, false);
C14957gcv.c(inflate, "");
TransactionItemViewHolder transactionItemViewHolder = new TransactionItemViewHolder(this, inflate);
String str = c1049Un.l;
TextView textView = null;
if (str != null) {
if (str.length() > 0) {
TextView textView2 = transactionItemViewHolder.tvCreditCardReferenceName;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(c1049Un.l);
} else {
TextView textView3 = transactionItemViewHolder.tvCreditCardReferenceName;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(c1049Un.p.c);
}
}
TextView textView4 = transactionItemViewHolder.tvTapViewModeDetail;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
textView4.setText(this.c.getString(R.string.travelcard_see_more));
C13020fOa b = Picasso.d().e(c1049Un.j).e(R.drawable.default_card_without_logo).b(R.drawable.default_card);
b.e = true;
C13020fOa a = b.a(EnumC12984fNP.NO_STORE, new EnumC12984fNP[0]);
ImageView imageView = transactionItemViewHolder.ivCardArt;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
a.aBu_(imageView, null);
if (c1049Un.g.length() > 0) {
TextView textView5 = transactionItemViewHolder.tvCardNumber;
if (textView5 != null) {
textView = textView5;
} else {
C14957gcv.a("");
}
String substring = c1049Un.g.substring(r1.length() - 4);
C14957gcv.c((Object) substring, "");
textView.setText(substring);
} else {
TextView textView6 = transactionItemViewHolder.tvCardNumber;
if (textView6 != null) {
textView = textView6;
} else {
C14957gcv.a("");
}
textView.setText("");
}
View view2 = transactionItemViewHolder.b;
view2.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.eqY
private int a;
private PrepaidViewPagerAdapter c;
@Override // android.view.View.OnClickListener
public final void onClick(View view3) {
PrepaidViewPagerAdapter.e(this.c, this.a);
}
{
this.c = this;
this.a = i;
}
});
view = view2;
}
viewGroup.addView(view, 0);
return view;
}
/* loaded from: classes5.dex */
public final class TransactionItemViewHolder extends RecyclerView.zJl {
private PrepaidViewPagerAdapter a;
final View b;
@BindView
public ImageView ivCardArt;
@BindView
public TextView tvCardNumber;
@BindView
public TextView tvCreditCardReferenceName;
@BindView
public TextView tvTapViewModeDetail;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public TransactionItemViewHolder(PrepaidViewPagerAdapter prepaidViewPagerAdapter, View view) {
super(view);
C14957gcv.e(view, "");
this.a = prepaidViewPagerAdapter;
this.b = view;
ButterKnife.c(this, view);
}
}
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
public static /* synthetic */ void e(PrepaidViewPagerAdapter prepaidViewPagerAdapter, int i) {
C14957gcv.e(prepaidViewPagerAdapter, "");
prepaidViewPagerAdapter.b.d(i);
}
@Override // o.WYJ
public final boolean isViewFromObject(View view, Object obj) {
C14957gcv.e(view, "");
C14957gcv.e(obj, "");
return view == obj;
}
static {
new Sts((byte) 0);
}
}