what-the-bank/sources/com/scb/phone/view/adapter/investment/purchase/CreditCardDetailsAdapter.java

113 lines
3.7 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.investment.purchase;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import com.scb.phone.R;
import java.util.ArrayList;
import java.util.List;
import o.C0367Fb;
import o.WYJ;
import o.nMh;
import o.pyT;
/* loaded from: classes5.dex */
public final class CreditCardDetailsAdapter extends WYJ {
private Context b;
public int d = 0;
public List<C0367Fb> 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 b;
public ItemViewHolder_ViewBinding(ItemViewHolder itemViewHolder, View view) {
this.b = itemViewHolder;
itemViewHolder.background = (LinearLayout) pyT.e(view, R.id.card_container_linear_layout, "field 'background'", LinearLayout.class);
itemViewHolder.nickName = (TextView) pyT.e(view, R.id.nick_name_text_view, "field 'nickName'", TextView.class);
itemViewHolder.availableBalance = (TextView) pyT.e(view, R.id.fund_account_no_text_view, "field 'availableBalance'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ItemViewHolder itemViewHolder = this.b;
if (itemViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.b = null;
itemViewHolder.background = null;
itemViewHolder.nickName = null;
itemViewHolder.availableBalance = null;
}
}
public CreditCardDetailsAdapter(Context context, List<C0367Fb> list) {
this.b = context;
this.e = list == null ? new ArrayList<>() : list;
}
@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);
}
@Override // o.WYJ
public final Object instantiateItem(ViewGroup viewGroup, int i) {
C0367Fb c0367Fb = this.e.get(i);
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559105, viewGroup, false);
ItemViewHolder itemViewHolder = new ItemViewHolder(inflate);
if (!TextUtils.isEmpty(c0367Fb.S)) {
itemViewHolder.nickName.setText(c0367Fb.S);
} else {
itemViewHolder.nickName.setText(c0367Fb.X);
}
itemViewHolder.availableBalance.setText(c0367Fb.d);
itemViewHolder.background.setTag("TAG_CREDIT_CARD_LIST_ADAPTER".concat(String.valueOf(i)));
if (this.d == i) {
itemViewHolder.background.setBackground(nMh.getDrawable(this.b, R.drawable.rounded_purple_view_pager));
} else {
itemViewHolder.background.setBackground(nMh.getDrawable(this.b, R.drawable.bg_white_rounded));
}
viewGroup.addView(inflate);
return itemViewHolder.a;
}
/* loaded from: classes5.dex */
static class ItemViewHolder extends RecyclerView.zJl {
View a;
@BindView
TextView availableBalance;
@BindView
LinearLayout background;
@BindView
TextView nickName;
ItemViewHolder(View view) {
super(view);
this.a = view;
ButterKnife.c(this, view);
}
}
}