164 lines
6.3 KiB
Java
164 lines
6.3 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.RelativeLayout;
|
|
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.EditFavouriteAdapter;
|
|
import java.util.List;
|
|
import o.AbstractC1181Xh;
|
|
import o.AbstractC5347brN;
|
|
import o.C1182Xi;
|
|
import o.C12891fKc;
|
|
import o.fHU;
|
|
import o.nMh;
|
|
import o.pyT;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class EditFavouriteAdapter extends RecyclerView.Sts<EditFavouriteHolder> {
|
|
private Drawable b;
|
|
private fHU c;
|
|
private List<? extends AbstractC1181Xh> d;
|
|
private Context e;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class EditFavouriteHolder_ViewBinding implements Unbinder {
|
|
private EditFavouriteHolder b;
|
|
|
|
public EditFavouriteHolder_ViewBinding(EditFavouriteHolder editFavouriteHolder, View view) {
|
|
this.b = editFavouriteHolder;
|
|
editFavouriteHolder.avatar = (ImageView) pyT.e(view, R.id.edit_favourite_icon, "field 'avatar'", ImageView.class);
|
|
editFavouriteHolder.title = (TextView) pyT.e(view, R.id.edit_favourite_title, "field 'title'", TextView.class);
|
|
editFavouriteHolder.deleteButton = (RelativeLayout) pyT.e(view, R.id.edit_favourite_delete_relative_layout, "field 'deleteButton'", RelativeLayout.class);
|
|
editFavouriteHolder.editButton = (RelativeLayout) pyT.e(view, R.id.edit_favourite_edit_relative_layout, "field 'editButton'", RelativeLayout.class);
|
|
editFavouriteHolder.divider = pyT.a(view, R.id.edit_favourite_divider_view, "field 'divider'");
|
|
editFavouriteHolder.fullDivider = pyT.a(view, R.id.edit_favourite_full_divider_view, "field 'fullDivider'");
|
|
}
|
|
|
|
@Override // butterknife.Unbinder
|
|
public final void a() {
|
|
EditFavouriteHolder editFavouriteHolder = this.b;
|
|
if (editFavouriteHolder == null) {
|
|
throw new IllegalStateException("Bindings already cleared.");
|
|
}
|
|
this.b = null;
|
|
editFavouriteHolder.avatar = null;
|
|
editFavouriteHolder.title = null;
|
|
editFavouriteHolder.deleteButton = null;
|
|
editFavouriteHolder.editButton = null;
|
|
editFavouriteHolder.divider = null;
|
|
editFavouriteHolder.fullDivider = null;
|
|
}
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final /* synthetic */ void onBindViewHolder(EditFavouriteHolder editFavouriteHolder, final int i) {
|
|
EditFavouriteHolder editFavouriteHolder2 = editFavouriteHolder;
|
|
final AbstractC1181Xh abstractC1181Xh = this.d.get(i);
|
|
C1182Xi c1182Xi = (C1182Xi) abstractC1181Xh;
|
|
editFavouriteHolder2.title.setText(abstractC1181Xh.e());
|
|
TextView textView = editFavouriteHolder2.title;
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(abstractC1181Xh.e());
|
|
sb.append(c1182Xi.g);
|
|
sb.append(c1182Xi.m);
|
|
textView.setContentDescription(sb.toString());
|
|
editFavouriteHolder2.deleteButton.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.ezH
|
|
private EditFavouriteAdapter a;
|
|
private int e;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
this.a.c.b(this.e);
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
this.e = i;
|
|
}
|
|
});
|
|
editFavouriteHolder2.editButton.setOnClickListener(new View.OnClickListener(this, i, abstractC1181Xh) { // from class: o.ezG
|
|
private EditFavouriteAdapter a;
|
|
private AbstractC1181Xh b;
|
|
private int d;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
this.a.c.c(this.d, this.b.e());
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
this.d = i;
|
|
this.b = abstractC1181Xh;
|
|
}
|
|
});
|
|
if ("TRANSFER".equalsIgnoreCase(c1182Xi.r)) {
|
|
this.b = nMh.getDrawable(this.e, R.drawable.bankicon_place_holder);
|
|
} else if ("REMITTANCE".equalsIgnoreCase(c1182Xi.r)) {
|
|
this.b = nMh.getDrawable(this.e, R.drawable.bankicon_remittance);
|
|
}
|
|
C12891fKc.azg_(this.e, this.b, editFavouriteHolder2.avatar, abstractC1181Xh.c(), this.e.getResources().getDimensionPixelOffset(R.dimen.f15242131165288), nMh.getColor(this.e, R.color.f3412131099849));
|
|
if (i == this.d.size() - 1) {
|
|
editFavouriteHolder2.divider.setVisibility(8);
|
|
editFavouriteHolder2.fullDivider.setVisibility(0);
|
|
} else {
|
|
editFavouriteHolder2.divider.setVisibility(0);
|
|
editFavouriteHolder2.fullDivider.setVisibility(8);
|
|
}
|
|
}
|
|
|
|
public EditFavouriteAdapter(Context context, fHU fhu, List<? extends AbstractC1181Xh> list) {
|
|
this.e = context;
|
|
this.d = list;
|
|
this.c = fhu;
|
|
this.b = nMh.getDrawable(context, R.drawable.biller_place_holder).mutate();
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final int getItemCount() {
|
|
return this.d.size();
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static class EditFavouriteHolder extends AbstractC5347brN {
|
|
|
|
@BindView
|
|
ImageView avatar;
|
|
|
|
@BindView
|
|
RelativeLayout deleteButton;
|
|
|
|
@BindView
|
|
View divider;
|
|
|
|
@BindView
|
|
RelativeLayout editButton;
|
|
|
|
@BindView
|
|
View fullDivider;
|
|
|
|
@BindView
|
|
TextView title;
|
|
|
|
public EditFavouriteHolder(View view) {
|
|
super(view);
|
|
ButterKnife.c(this, view);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final /* synthetic */ EditFavouriteHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
|
return new EditFavouriteHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559114, viewGroup, false));
|
|
}
|
|
}
|