what-the-bank/sources/com/scb/phone/view/adapter/bankingactions/BankingActionAdapter.java

135 lines
4.9 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.bankingactions;
import android.content.Context;
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.bankingactions.BankingActionAdapter;
import java.util.ArrayList;
import o.C12891fKc;
import o.C6583cXR;
import o.FG;
import o.FH;
import o.InterfaceC12835fIj;
import o.pyT;
/* loaded from: classes5.dex */
public final class BankingActionAdapter extends RecyclerView.Sts<CustomViewHolder> {
private Context c;
public ArrayList<FG> d;
private InterfaceC12835fIj e;
/* loaded from: classes5.dex */
public class CustomViewHolder_ViewBinding implements Unbinder {
private CustomViewHolder c;
public CustomViewHolder_ViewBinding(CustomViewHolder customViewHolder, View view) {
this.c = customViewHolder;
customViewHolder.icon = (ImageView) pyT.e(view, R.id.banking_action_icon, "field 'icon'", ImageView.class);
customViewHolder.description = (TextView) pyT.e(view, R.id.banking_action_description, "field 'description'", TextView.class);
customViewHolder.clickedAnimationView = pyT.a(view, R.id.clicked_animation_view, "field 'clickedAnimationView'");
}
@Override // butterknife.Unbinder
public final void a() {
CustomViewHolder customViewHolder = this.c;
if (customViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
customViewHolder.icon = null;
customViewHolder.description = null;
customViewHolder.clickedAnimationView = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(CustomViewHolder customViewHolder, int i) {
CustomViewHolder customViewHolder2 = customViewHolder;
customViewHolder2.c = i;
FG fg = this.d.get(i);
boolean equals = FH.ENABLED.type.equals(fg.e);
customViewHolder2.a = equals;
customViewHolder2.clickedAnimationView.setEnabled(equals);
customViewHolder2.icon.setPadding(C6583cXR.d(20, this.c), C6583cXR.d(10, this.c), C6583cXR.d(20, this.c), C6583cXR.d(10, this.c));
customViewHolder2.description.setPadding(C6583cXR.d(4, this.c), 0, C6583cXR.d(4, this.c), 0);
customViewHolder2.description.setText(fg.f);
C12891fKc.azE_(customViewHolder2.icon, fg.a);
if (equals) {
customViewHolder2.icon.setAlpha(1.0f);
customViewHolder2.description.setAlpha(1.0f);
} else {
customViewHolder2.icon.setAlpha(0.2f);
customViewHolder2.description.setAlpha(0.2f);
}
}
public BankingActionAdapter(InterfaceC12835fIj interfaceC12835fIj, Context context) {
this.e = interfaceC12835fIj;
this.c = context;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
ArrayList<FG> arrayList = this.d;
if (arrayList == null) {
return 0;
}
return arrayList.size();
}
/* loaded from: classes5.dex */
public class CustomViewHolder extends RecyclerView.zJl {
boolean a;
private BankingActionAdapter b;
int c;
@BindView
View clickedAnimationView;
@BindView
TextView description;
@BindView
ImageView icon;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
CustomViewHolder(BankingActionAdapter bankingActionAdapter, View view) {
super(view);
this.b = bankingActionAdapter;
ButterKnife.c(this, view);
view.setOnClickListener(new View.OnClickListener(this) { // from class: o.erf
private BankingActionAdapter.CustomViewHolder b;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
BankingActionAdapter.CustomViewHolder.c(this.b);
}
{
this.b = this;
}
});
}
public static /* synthetic */ void c(CustomViewHolder customViewHolder) {
if (customViewHolder.b.e == null || !customViewHolder.a) {
return;
}
customViewHolder.b.e.e(customViewHolder.c);
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ CustomViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
return new CustomViewHolder(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559063, (ViewGroup) null));
}
}