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

138 lines
4.5 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.CardViewPagerAdapter;
import java.util.List;
import o.C0377Ff;
import o.C12891fKc;
import o.InterfaceC12840fIo;
import o.WYJ;
import o.pyT;
/* loaded from: classes5.dex */
public final class CardViewPagerAdapter extends WYJ {
private List<C0377Ff> c;
private InterfaceC12840fIo d;
private LayoutInflater e;
@Override // o.WYJ
public final boolean isViewFromObject(View view, Object obj) {
return view == obj;
}
/* loaded from: classes5.dex */
public class ItemViewHolder_ViewBinding implements Unbinder {
private ItemViewHolder e;
public ItemViewHolder_ViewBinding(ItemViewHolder itemViewHolder, View view) {
this.e = itemViewHolder;
itemViewHolder.cardName = (TextView) pyT.e(view, R.id.tv_credit_card_reference_name, "field 'cardName'", TextView.class);
itemViewHolder.imageCardArt = (ImageView) pyT.e(view, R.id.image_card_art, "field 'imageCardArt'", ImageView.class);
itemViewHolder.creditCardNumber = (TextView) pyT.e(view, R.id.tv_card_number, "field 'creditCardNumber'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ItemViewHolder itemViewHolder = this.e;
if (itemViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
itemViewHolder.cardName = null;
itemViewHolder.imageCardArt = null;
itemViewHolder.creditCardNumber = null;
}
}
public CardViewPagerAdapter(Context context, List<C0377Ff> list, InterfaceC12840fIo interfaceC12840fIo) {
this.e = (LayoutInflater) context.getSystemService("layout_inflater");
this.c = list;
this.d = interfaceC12840fIo;
}
@Override // o.WYJ
public final int getCount() {
return this.c.size();
}
@Override // o.WYJ
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
viewGroup.removeView((View) obj);
}
@Override // o.WYJ
public final Object instantiateItem(ViewGroup viewGroup, final int i) {
String str;
C0377Ff c0377Ff = this.c.get(i);
ItemViewHolder itemViewHolder = new ItemViewHolder(this.e.inflate(R.layout.2131559077, (ViewGroup) null));
if (c0377Ff.a.isEmpty() && c0377Ff.d.isEmpty()) {
itemViewHolder.cardName.setVisibility(4);
itemViewHolder.creditCardNumber.setText(c0377Ff.b);
} else {
TextView textView = itemViewHolder.cardName;
if (!c0377Ff.a.isEmpty()) {
str = c0377Ff.a;
} else {
str = c0377Ff.d;
}
textView.setText(str);
itemViewHolder.creditCardNumber.setText(c0377Ff.b);
}
C12891fKc.azv_(c0377Ff.c, R.drawable.loading_card, R.drawable.loading_card, itemViewHolder.imageCardArt);
View view = itemViewHolder.e;
view.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.eqO
private int b;
private CardViewPagerAdapter e;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
CardViewPagerAdapter.b(this.e, this.b);
}
{
this.e = this;
this.b = i;
}
});
viewGroup.addView(view, 0);
return view;
}
/* loaded from: classes5.dex */
static class ItemViewHolder extends RecyclerView.zJl {
@BindView
TextView cardName;
@BindView
TextView creditCardNumber;
View e;
@BindView
ImageView imageCardArt;
ItemViewHolder(View view) {
super(view);
this.e = view;
ButterKnife.c(this, view);
}
}
public static /* synthetic */ void b(CardViewPagerAdapter cardViewPagerAdapter, int i) {
InterfaceC12840fIo interfaceC12840fIo = cardViewPagerAdapter.d;
if (interfaceC12840fIo != null) {
interfaceC12840fIo.d(i);
}
}
}