what-the-bank/sources/com/scb/phone/view/adapter/ntb/selectaccount/SelectAccountAdapter.java

169 lines
6.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.ntb.selectaccount;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
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.ntb.selectaccount.SelectAccountAdapter;
import java.util.List;
import o.C12891fKc;
import o.SL;
import o.pyT;
/* loaded from: classes5.dex */
public final class SelectAccountAdapter extends RecyclerView.Sts {
private HBt b;
public boolean c;
private List<SL> d;
private boolean e = false;
/* loaded from: classes5.dex */
public interface HBt {
void c(int i);
void d(int i);
void e(int i);
}
/* loaded from: classes5.dex */
public class SelectAccountHolder_ViewBinding implements Unbinder {
private SelectAccountHolder c;
public SelectAccountHolder_ViewBinding(SelectAccountHolder selectAccountHolder, View view) {
this.c = selectAccountHolder;
selectAccountHolder.imageAccountType = (ImageView) pyT.e(view, R.id.image_account_type, "field 'imageAccountType'", ImageView.class);
selectAccountHolder.textAccountType = (TextView) pyT.e(view, R.id.text_account_type, "field 'textAccountType'", TextView.class);
selectAccountHolder.textAccountDescription = (TextView) pyT.e(view, R.id.text_account_description, "field 'textAccountDescription'", TextView.class);
selectAccountHolder.buttonDetail = (Button) pyT.e(view, R.id.btn_detail, "field 'buttonDetail'", Button.class);
selectAccountHolder.buttonSelect = (Button) pyT.e(view, R.id.btn_select, "field 'buttonSelect'", Button.class);
selectAccountHolder.cardViewAccountType = (CardView) pyT.e(view, R.id.cv_account_type, "field 'cardViewAccountType'", CardView.class);
}
@Override // butterknife.Unbinder
public final void a() {
SelectAccountHolder selectAccountHolder = this.c;
if (selectAccountHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
selectAccountHolder.imageAccountType = null;
selectAccountHolder.textAccountType = null;
selectAccountHolder.textAccountDescription = null;
selectAccountHolder.buttonDetail = null;
selectAccountHolder.buttonSelect = null;
selectAccountHolder.cardViewAccountType = null;
}
}
public SelectAccountAdapter(List<SL> list, HBt hBt) {
this.d = list;
this.b = hBt;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
return new SelectAccountHolder(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559220, viewGroup, false));
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final void onBindViewHolder(RecyclerView.zJl zjl, final int i) {
if (zjl instanceof SelectAccountHolder) {
SL sl = this.d.get(i);
SelectAccountHolder selectAccountHolder = (SelectAccountHolder) zjl;
C12891fKc.azy_(selectAccountHolder.imageAccountType, sl.a);
selectAccountHolder.textAccountType.setText(sl.h);
selectAccountHolder.textAccountDescription.setText(sl.d);
selectAccountHolder.buttonDetail.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.exx
private int d;
private SelectAccountAdapter e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.e.b.e(this.d);
}
{
this.e = this;
this.d = i;
}
});
selectAccountHolder.buttonSelect.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.exB
private int c;
private SelectAccountAdapter d;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.d.b.c(this.c);
}
{
this.d = this;
this.c = i;
}
});
if (this.c) {
selectAccountHolder.cardViewAccountType.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.exy
private SelectAccountAdapter a;
private int b;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.a.b.d(this.b);
}
{
this.a = this;
this.b = i;
}
});
selectAccountHolder.buttonDetail.setVisibility(4);
selectAccountHolder.buttonSelect.setVisibility(4);
}
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.d.size();
}
/* loaded from: classes5.dex */
public class SelectAccountHolder extends RecyclerView.zJl {
@BindView
Button buttonDetail;
@BindView
Button buttonSelect;
@BindView
CardView cardViewAccountType;
private SelectAccountAdapter e;
@BindView
ImageView imageAccountType;
@BindView
TextView textAccountDescription;
@BindView
TextView textAccountType;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SelectAccountHolder(SelectAccountAdapter selectAccountAdapter, View view) {
super(view);
this.e = selectAccountAdapter;
ButterKnife.c(this, view);
}
}
}