what-the-bank/sources/com/scb/phone/view/adapter/address/SubDistrictSearchAdapter.java

144 lines
4.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.address;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
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.address.SubDistrictSearchAdapter;
import java.util.List;
import o.C0406Fx;
import o.YM;
import o.pyT;
/* loaded from: classes5.dex */
public final class SubDistrictSearchAdapter extends RecyclerView.Sts<ViewHolder> {
public List<C0406Fx> b;
public RVV d;
private YM e;
/* loaded from: classes5.dex */
public interface RVV {
void c(C0406Fx c0406Fx);
}
/* loaded from: classes5.dex */
public class ViewHolder_ViewBinding implements Unbinder {
private ViewHolder c;
public ViewHolder_ViewBinding(ViewHolder viewHolder, View view) {
this.c = viewHolder;
viewHolder.subDistrictText = (TextView) pyT.e(view, R.id.sub_district_text, "field 'subDistrictText'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ViewHolder viewHolder = this.c;
if (viewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
viewHolder.subDistrictText = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(ViewHolder viewHolder, final int i) {
String str;
ViewHolder viewHolder2 = viewHolder;
if (i < this.b.size()) {
C0406Fx c0406Fx = this.b.get(i);
int i2 = AnonymousClass5.e[this.e.ordinal()];
if (i2 == 1) {
str = c0406Fx.h;
} else if (i2 == 2) {
str = c0406Fx.d;
} else if (i2 != 3) {
str = i2 != 4 ? "" : c0406Fx.c;
} else {
str = c0406Fx.i;
}
viewHolder2.subDistrictText.setText(str);
viewHolder2.itemView.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.ere
private SubDistrictSearchAdapter a;
private int d;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
SubDistrictSearchAdapter.b(this.a, this.d);
}
{
this.a = this;
this.d = i;
}
});
}
}
public SubDistrictSearchAdapter(List<C0406Fx> list, YM ym) {
this.b = list;
this.e = ym;
}
/* renamed from: com.scb.phone.view.adapter.address.SubDistrictSearchAdapter$5, reason: invalid class name */
/* loaded from: classes5.dex */
static /* synthetic */ class AnonymousClass5 {
static final int[] e;
static {
int[] iArr = new int[YM.values().length];
e = iArr;
try {
iArr[YM.PROVINCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
e[YM.DISTRICT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
e[YM.SUB_DISTRICT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
e[YM.POSTAL_CODE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.b.size();
}
/* loaded from: classes5.dex */
static class ViewHolder extends RecyclerView.zJl {
@BindView
TextView subDistrictText;
public ViewHolder(View view) {
super(view);
ButterKnife.c(this, view);
}
}
public static /* synthetic */ void b(SubDistrictSearchAdapter subDistrictSearchAdapter, int i) {
RVV rvv = subDistrictSearchAdapter.d;
if (rvv != null) {
rvv.c(subDistrictSearchAdapter.b.get(i));
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
return new ViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559362, viewGroup, false));
}
}