144 lines
5.5 KiB
Java
144 lines
5.5 KiB
Java
package com.scb.phone.view.adapter.transferandpay;
|
|
|
|
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.FavouriteTargetAdapter;
|
|
import java.util.List;
|
|
import o.AbstractC1181Xh;
|
|
import o.C1182Xi;
|
|
import o.C12891fKc;
|
|
import o.InterfaceC12824fIT;
|
|
import o.nMh;
|
|
import o.pyT;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class FavouriteTargetAdapter extends RecyclerView.Sts<ItemViewHolder> {
|
|
private Drawable a;
|
|
public int b;
|
|
public List<? extends AbstractC1181Xh> c;
|
|
private Context d;
|
|
private InterfaceC12824fIT e;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class ItemViewHolder_ViewBinding implements Unbinder {
|
|
private ItemViewHolder e;
|
|
|
|
public ItemViewHolder_ViewBinding(ItemViewHolder itemViewHolder, View view) {
|
|
this.e = itemViewHolder;
|
|
itemViewHolder.name = (TextView) pyT.e(view, R.id.biller_name_text_view, "field 'name'", TextView.class);
|
|
itemViewHolder.avatar = (ImageView) pyT.e(view, R.id.biller_avatar_image_view, "field 'avatar'", ImageView.class);
|
|
itemViewHolder.selectedBorder = (ImageView) pyT.e(view, R.id.biller_selected_border_image_view, "field 'selectedBorder'", ImageView.class);
|
|
}
|
|
|
|
@Override // butterknife.Unbinder
|
|
public final void a() {
|
|
ItemViewHolder itemViewHolder = this.e;
|
|
if (itemViewHolder == null) {
|
|
throw new IllegalStateException("Bindings already cleared.");
|
|
}
|
|
this.e = null;
|
|
itemViewHolder.name = null;
|
|
itemViewHolder.avatar = null;
|
|
itemViewHolder.selectedBorder = null;
|
|
}
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final /* synthetic */ void onBindViewHolder(ItemViewHolder itemViewHolder, final int i) {
|
|
ItemViewHolder itemViewHolder2 = itemViewHolder;
|
|
AbstractC1181Xh abstractC1181Xh = this.c.get(i);
|
|
C1182Xi c1182Xi = (C1182Xi) abstractC1181Xh;
|
|
if (this.b != i) {
|
|
itemViewHolder2.name.setTextColor(nMh.getColor(this.d, R.color.f2272131099733));
|
|
itemViewHolder2.selectedBorder.setVisibility(8);
|
|
} else {
|
|
itemViewHolder2.name.setTextColor(nMh.getColor(this.d, R.color.f13682131100876));
|
|
itemViewHolder2.selectedBorder.setVisibility(0);
|
|
}
|
|
if ("TRANSFER".equalsIgnoreCase(c1182Xi.r)) {
|
|
this.a = nMh.getDrawable(this.d, R.drawable.bankicon_place_holder);
|
|
} else if ("REMITTANCE".equalsIgnoreCase(c1182Xi.r)) {
|
|
this.a = nMh.getDrawable(this.d, R.drawable.bankicon_remittance);
|
|
}
|
|
C12891fKc.azg_(this.d, this.a, itemViewHolder2.avatar, abstractC1181Xh.c(), this.d.getResources().getDimensionPixelOffset(R.dimen.f15212131165285), nMh.getColor(this.d, R.color.f3412131099849));
|
|
itemViewHolder2.name.setText(abstractC1181Xh.e());
|
|
itemViewHolder2.itemView.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.ezI
|
|
private int a;
|
|
private FavouriteTargetAdapter c;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
FavouriteTargetAdapter.a(this.c, this.a);
|
|
}
|
|
|
|
{
|
|
this.c = this;
|
|
this.a = i;
|
|
}
|
|
});
|
|
}
|
|
|
|
public FavouriteTargetAdapter(Context context, List<? extends AbstractC1181Xh> list, InterfaceC12824fIT interfaceC12824fIT) {
|
|
this.b = -1;
|
|
this.d = context;
|
|
this.c = list;
|
|
this.a = nMh.getDrawable(context, R.drawable.biller_place_holder);
|
|
this.e = interfaceC12824fIT;
|
|
}
|
|
|
|
public FavouriteTargetAdapter(Context context, List<AbstractC1181Xh> list, InterfaceC12824fIT interfaceC12824fIT, byte b) {
|
|
this(context, list, interfaceC12824fIT);
|
|
this.b = 0;
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final int getItemCount() {
|
|
return this.c.size();
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class ItemViewHolder extends RecyclerView.zJl {
|
|
|
|
@BindView
|
|
ImageView avatar;
|
|
private View c;
|
|
private FavouriteTargetAdapter e;
|
|
|
|
@BindView
|
|
TextView name;
|
|
|
|
@BindView
|
|
ImageView selectedBorder;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
ItemViewHolder(FavouriteTargetAdapter favouriteTargetAdapter, View view) {
|
|
super(view);
|
|
this.e = favouriteTargetAdapter;
|
|
this.c = view;
|
|
ButterKnife.c(this, view);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(FavouriteTargetAdapter favouriteTargetAdapter, int i) {
|
|
InterfaceC12824fIT interfaceC12824fIT = favouriteTargetAdapter.e;
|
|
if (interfaceC12824fIT != null) {
|
|
interfaceC12824fIT.a(i);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final /* synthetic */ ItemViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
|
return new ItemViewHolder(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559120, viewGroup, false));
|
|
}
|
|
}
|