what-the-bank/sources/com/scb/phone/view/adapter/transferandpay/transfer/TransferToOthersStep1Adapte...

192 lines
7.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.transferandpay.transfer;
import android.content.Context;
import android.graphics.drawable.Drawable;
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 com.scb.phone.view.adapter.transferandpay.transfer.TransferToOthersStep1Adapter;
import com.squareup.picasso.Picasso;
import java.util.List;
import o.C1236Yq;
import o.C12891fKc;
import o.nMh;
import o.pyT;
/* loaded from: classes5.dex */
public final class TransferToOthersStep1Adapter extends RecyclerView.Sts<LocalViewHolder> {
private RVV a;
private List<C1236Yq> b;
private HBt c;
private boolean e;
@FunctionalInterface
/* loaded from: classes5.dex */
public interface HBt {
void e(C1236Yq c1236Yq);
}
/* loaded from: classes5.dex */
public interface RVV {
void d(C1236Yq c1236Yq);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final long getItemId(int i) {
return i;
}
/* loaded from: classes5.dex */
public class LocalViewHolder_ViewBinding implements Unbinder {
private LocalViewHolder e;
public LocalViewHolder_ViewBinding(LocalViewHolder localViewHolder, View view) {
this.e = localViewHolder;
localViewHolder.imageIcon = (ImageView) pyT.e(view, R.id.image_icon, "field 'imageIcon'", ImageView.class);
localViewHolder.textTitle = (TextView) pyT.e(view, R.id.text_title, "field 'textTitle'", TextView.class);
localViewHolder.tempBlockText = (TextView) pyT.e(view, R.id.tv_temp_block, "field 'tempBlockText'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
LocalViewHolder localViewHolder = this.e;
if (localViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
localViewHolder.imageIcon = null;
localViewHolder.textTitle = null;
localViewHolder.tempBlockText = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(LocalViewHolder localViewHolder, int i) {
final LocalViewHolder localViewHolder2 = localViewHolder;
final C1236Yq c1236Yq = this.b.get(i);
localViewHolder2.textTitle.setText(c1236Yq.a.trim());
String str = c1236Yq.e;
Picasso d = Picasso.d();
ImageView imageView = localViewHolder2.imageIcon;
if (imageView == null) {
throw new IllegalArgumentException("view cannot be null.");
}
d.e(imageView);
Context context = localViewHolder2.a;
C12891fKc.azg_(context, localViewHolder2.e, localViewHolder2.imageIcon, str, context.getResources().getDimensionPixelOffset(R.dimen.f15222131165286), nMh.getColor(localViewHolder2.a, R.color.f3412131099849));
if ((c1236Yq.d != null && !c1236Yq.d.a) || localViewHolder2.b.e) {
localViewHolder2.itemView.setAlpha(1.0f);
localViewHolder2.imageIcon.setAlpha(1.0f);
localViewHolder2.textTitle.setAlpha(1.0f);
localViewHolder2.itemView.setOnClickListener(new View.OnClickListener(localViewHolder2, c1236Yq) { // from class: o.ezY
private C1236Yq c;
private TransferToOthersStep1Adapter.LocalViewHolder d;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
TransferToOthersStep1Adapter.LocalViewHolder.c(this.d, this.c);
}
{
this.d = localViewHolder2;
this.c = c1236Yq;
}
});
localViewHolder2.itemView.setEnabled(true);
return;
}
localViewHolder2.itemView.setAlpha(0.2f);
localViewHolder2.imageIcon.setAlpha(0.2f);
localViewHolder2.textTitle.setAlpha(0.2f);
localViewHolder2.tempBlockText.setVisibility(0);
localViewHolder2.itemView.setOnClickListener(new View.OnClickListener(localViewHolder2, c1236Yq) { // from class: o.ezW
private C1236Yq b;
private TransferToOthersStep1Adapter.LocalViewHolder e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
TransferToOthersStep1Adapter.LocalViewHolder.d(this.e, this.b);
}
{
this.e = localViewHolder2;
this.b = c1236Yq;
}
});
localViewHolder2.itemView.setEnabled(true);
}
public TransferToOthersStep1Adapter(List<C1236Yq> list, HBt hBt) {
this.e = true;
this.b = list;
this.c = hBt;
}
public TransferToOthersStep1Adapter(List<C1236Yq> list, HBt hBt, RVV rvv) {
this.b = list;
this.c = hBt;
this.a = rvv;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
List<C1236Yq> list = this.b;
if (list == null) {
return 0;
}
return list.size();
}
/* loaded from: classes5.dex */
public class LocalViewHolder extends RecyclerView.zJl {
final Context a;
final TransferToOthersStep1Adapter b;
Drawable e;
@BindView
ImageView imageIcon;
@BindView
TextView tempBlockText;
@BindView
TextView textTitle;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
LocalViewHolder(TransferToOthersStep1Adapter transferToOthersStep1Adapter, View view) {
super(view);
this.b = transferToOthersStep1Adapter;
ButterKnife.c(this, view);
Context context = view.getContext();
this.a = context;
this.e = nMh.getDrawable(context, R.drawable.bankicon_place_holder);
}
public static /* synthetic */ void d(LocalViewHolder localViewHolder, C1236Yq c1236Yq) {
if (localViewHolder.b.a != null) {
localViewHolder.b.a.d(c1236Yq);
}
}
public static /* synthetic */ void c(LocalViewHolder localViewHolder, C1236Yq c1236Yq) {
if (localViewHolder.b.c != null) {
localViewHolder.b.c.e(c1236Yq);
}
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ LocalViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
LocalViewHolder localViewHolder = new LocalViewHolder(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559386, viewGroup, false));
localViewHolder.setIsRecyclable(false);
return localViewHolder;
}
}