what-the-bank/sources/com/scb/phone/view/adapter/hml/frictionlessmoa/HmlMoaAdapter.java

179 lines
6.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.hml.frictionlessmoa;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RadioButton;
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.hml.frictionlessmoa.HmlMoaAdapter;
import java.util.List;
import o.C0770Oe;
import o.C14866gag;
import o.C14957gcv;
import o.InterfaceC14894gbR;
import o.pyT;
/* loaded from: classes5.dex */
public final class HmlMoaAdapter extends RecyclerView.Sts<HmlMoaViewHolder> {
private final List<C0770Oe> b;
private final InterfaceC14894gbR<C0770Oe, C14866gag> c;
private int d;
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(HmlMoaViewHolder hmlMoaViewHolder, final int i) {
HmlMoaViewHolder hmlMoaViewHolder2 = hmlMoaViewHolder;
C14957gcv.e(hmlMoaViewHolder2, "");
View view = hmlMoaViewHolder2.item;
RadioButton radioButton = null;
if (view == null) {
C14957gcv.a("");
view = null;
}
view.setOnClickListener(new View.OnClickListener(i, this) { // from class: o.euW
private int c;
private HmlMoaAdapter d;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
HmlMoaAdapter.a(this.c, this.d);
}
{
this.c = i;
this.d = this;
}
});
if (this.b.get(i).e) {
this.d = i;
}
C0770Oe c0770Oe = this.b.get(i);
C14957gcv.e(c0770Oe, "");
TextView textView = hmlMoaViewHolder2.account;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(c0770Oe.c);
TextView textView2 = hmlMoaViewHolder2.type;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(c0770Oe.d);
TextView textView3 = hmlMoaViewHolder2.nickname;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(c0770Oe.a);
RadioButton radioButton2 = hmlMoaViewHolder2.button;
if (radioButton2 != null) {
radioButton = radioButton2;
} else {
C14957gcv.a("");
}
radioButton.setChecked(c0770Oe.e);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ HmlMoaViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559278, viewGroup, false);
C14957gcv.c(inflate, "");
return new HmlMoaViewHolder(inflate);
}
/* JADX WARN: Multi-variable type inference failed */
public HmlMoaAdapter(InterfaceC14894gbR<? super C0770Oe, C14866gag> interfaceC14894gbR, List<C0770Oe> list) {
C14957gcv.e(interfaceC14894gbR, "");
C14957gcv.e(list, "");
this.c = interfaceC14894gbR;
this.b = list;
this.d = -1;
}
/* loaded from: classes5.dex */
public final class HmlMoaViewHolder_ViewBinding implements Unbinder {
private HmlMoaViewHolder c;
public HmlMoaViewHolder_ViewBinding(HmlMoaViewHolder hmlMoaViewHolder, View view) {
this.c = hmlMoaViewHolder;
hmlMoaViewHolder.item = pyT.a(view, R.id.rl_item, "field 'item'");
hmlMoaViewHolder.account = (TextView) pyT.e(view, R.id.tv_account, "field 'account'", TextView.class);
hmlMoaViewHolder.button = (RadioButton) pyT.e(view, R.id.rb_account, "field 'button'", RadioButton.class);
hmlMoaViewHolder.type = (TextView) pyT.e(view, R.id.tv_type_account, "field 'type'", TextView.class);
hmlMoaViewHolder.nickname = (TextView) pyT.e(view, R.id.tv_nickname, "field 'nickname'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
HmlMoaViewHolder hmlMoaViewHolder = this.c;
if (hmlMoaViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
hmlMoaViewHolder.item = null;
hmlMoaViewHolder.account = null;
hmlMoaViewHolder.button = null;
hmlMoaViewHolder.type = null;
hmlMoaViewHolder.nickname = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.b.size();
}
/* loaded from: classes5.dex */
public static final class HmlMoaViewHolder extends RecyclerView.zJl {
@BindView
public TextView account;
@BindView
public RadioButton button;
@BindView
public View item;
@BindView
public TextView nickname;
@BindView
public TextView type;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public HmlMoaViewHolder(View view) {
super(view);
C14957gcv.e(view, "");
ButterKnife.c(this, view);
RadioButton radioButton = this.button;
if (radioButton == null) {
C14957gcv.a("");
radioButton = null;
}
radioButton.setClickable(false);
}
}
public static /* synthetic */ void a(int i, HmlMoaAdapter hmlMoaAdapter) {
C14957gcv.e(hmlMoaAdapter, "");
int i2 = hmlMoaAdapter.d;
if (i != i2) {
if (i2 != -1) {
hmlMoaAdapter.b.get(i2).e = false;
}
hmlMoaAdapter.d = i;
hmlMoaAdapter.b.get(i).e = true;
}
hmlMoaAdapter.notifyDataSetChanged();
hmlMoaAdapter.c.invoke(hmlMoaAdapter.b.get(hmlMoaAdapter.d));
}
}