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.C0386Fk; import o.WYJ; import o.nMh; import o.pyT; /* loaded from: classes5.dex */ public final class AccountDetailsAdapter extends WYJ { public List a; private Context c; public int d = 0; @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 d; public ItemViewHolder_ViewBinding(ItemViewHolder itemViewHolder, View view) { this.d = 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.balance = (TextView) pyT.e(view, R.id.fund_account_no_text_view, "field 'balance'", TextView.class); } @Override // butterknife.Unbinder public final void a() { ItemViewHolder itemViewHolder = this.d; if (itemViewHolder == null) { throw new IllegalStateException("Bindings already cleared."); } this.d = null; itemViewHolder.background = null; itemViewHolder.nickName = null; itemViewHolder.balance = null; } } public AccountDetailsAdapter(Context context, List list) { this.c = context; this.a = list == null ? new ArrayList<>() : list; } @Override // o.WYJ public final int getCount() { return this.a.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) { C0386Fk c0386Fk = this.a.get(i); View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559105, viewGroup, false); ItemViewHolder itemViewHolder = new ItemViewHolder(inflate); itemViewHolder.nickName.setText(c0386Fk.v); if (!TextUtils.isEmpty(c0386Fk.v)) { itemViewHolder.nickName.setText(c0386Fk.v); } else { itemViewHolder.nickName.setText(c0386Fk.b); } itemViewHolder.balance.setText(c0386Fk.f); itemViewHolder.background.setTag("TAG_ACCOUNT_LIST_ADAPTER".concat(String.valueOf(i))); if (this.d == i) { itemViewHolder.background.setBackground(nMh.getDrawable(this.c, R.drawable.rounded_purple_view_pager)); } else { itemViewHolder.background.setBackground(nMh.getDrawable(this.c, R.drawable.bg_white_rounded)); } viewGroup.addView(inflate); return itemViewHolder.d; } /* loaded from: classes5.dex */ static class ItemViewHolder extends RecyclerView.zJl { @BindView LinearLayout background; @BindView TextView balance; View d; @BindView TextView nickName; ItemViewHolder(View view) { super(view); this.d = view; ButterKnife.c(this, view); } } }