package com.scb.phone.view.adapter.deposit; import android.graphics.Color; import android.graphics.drawable.GradientDrawable; import android.text.TextUtils; 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 java.util.ArrayList; import java.util.List; import o.C0386Fk; import o.C6583cXR; import o.WYJ; import o.guQ; import o.pyT; /* loaded from: classes5.dex */ public final class DepositAccountSelectorAdapter extends WYJ { private List a; public boolean d; @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.textAccountNumber = (TextView) pyT.e(view, R.id.text_account_number, "field 'textAccountNumber'", TextView.class); itemViewHolder.textAccountName = (TextView) pyT.e(view, R.id.text_account_name, "field 'textAccountName'", TextView.class); itemViewHolder.textBalance = (TextView) pyT.e(view, R.id.text_balance, "field 'textBalance'", TextView.class); itemViewHolder.imageIcon = (ImageView) pyT.e(view, R.id.image_icon, "field 'imageIcon'", ImageView.class); itemViewHolder.depositTagTextView = (TextView) pyT.e(view, R.id.deposit_tag_text_view, "field 'depositTagTextView'", 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.textAccountNumber = null; itemViewHolder.textAccountName = null; itemViewHolder.textBalance = null; itemViewHolder.imageIcon = null; itemViewHolder.depositTagTextView = null; } } public DepositAccountSelectorAdapter(List list) { 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) { View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559221, viewGroup, false); new ItemViewHolder(this, inflate).e(i); viewGroup.addView(inflate, 0); return inflate; } /* loaded from: classes5.dex */ class ItemViewHolder extends RecyclerView.zJl { private DepositAccountSelectorAdapter c; @BindView protected TextView depositTagTextView; private View e; @BindView protected ImageView imageIcon; @BindView protected TextView textAccountName; @BindView protected TextView textAccountNumber; @BindView protected TextView textBalance; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ ItemViewHolder(DepositAccountSelectorAdapter depositAccountSelectorAdapter, View view) { super(view); this.c = depositAccountSelectorAdapter; this.e = view; ButterKnife.c(this, view); } final void e(int i) { C0386Fk c0386Fk = (C0386Fk) this.c.a.get(i); String str = c0386Fk.v; if (TextUtils.isEmpty(str)) { str = C6583cXR.a(c0386Fk.A, c0386Fk.u); } this.textAccountName.setText(str); this.textAccountNumber.setText(c0386Fk.b); this.depositTagTextView.setVisibility(c0386Fk.H ? 0 : 8); if (c0386Fk.H) { this.depositTagTextView.setText(c0386Fk.l); try { GradientDrawable gradientDrawable = (GradientDrawable) this.depositTagTextView.getResources().getDrawable(R.drawable.bg_rounded_rectangle_borderless); gradientDrawable.setColor(Color.parseColor(c0386Fk.f8173o)); this.depositTagTextView.setBackground(gradientDrawable); } catch (IllegalArgumentException e) { guQ.a("Invalid color code sent from server", e); } } this.textBalance.setText(c0386Fk.f); if (this.c.d) { this.imageIcon.setImageResource(R.drawable.ic_account_summary_juristic); } } } }