what-the-bank/sources/com/scb/phone/view/adapter/transferandpay/ProxySourceAdapter.java

144 lines
4.7 KiB
Java

package com.scb.phone.view.adapter.transferandpay;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
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.ProxySourceAdapter;
import java.util.ArrayList;
import java.util.List;
import o.InterfaceC12824fIT;
import o.VL;
import o.WYJ;
import o.nMh;
import o.pyT;
/* loaded from: classes5.dex */
public final class ProxySourceAdapter extends WYJ {
private InterfaceC12824fIT a;
private Context b;
public List<VL> c;
private LayoutInflater d;
public int e = 0;
@Override // o.WYJ
public final int getItemPosition(Object obj) {
return -2;
}
@Override // o.WYJ
public final boolean isViewFromObject(View view, Object obj) {
return view == obj;
}
/* loaded from: classes5.dex */
public class ItemViewHolder_ViewBinding implements Unbinder {
private ItemViewHolder d;
public ItemViewHolder_ViewBinding(ItemViewHolder itemViewHolder, View view) {
this.d = itemViewHolder;
itemViewHolder.background = (LinearLayout) pyT.e(view, R.id.account_source_linear_layout, "field 'background'", LinearLayout.class);
itemViewHolder.title = (TextView) pyT.e(view, R.id.account_source_name_text_view, "field 'title'", TextView.class);
itemViewHolder.fund = (TextView) pyT.e(view, R.id.account_source_funds_text_view, "field 'fund'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ItemViewHolder itemViewHolder = this.d;
if (itemViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
itemViewHolder.background = null;
itemViewHolder.title = null;
itemViewHolder.fund = null;
}
}
public ProxySourceAdapter(Context context, List<VL> list, InterfaceC12824fIT interfaceC12824fIT) {
this.b = context;
this.d = (LayoutInflater) context.getSystemService("layout_inflater");
this.c = list == null ? new ArrayList<>() : list;
this.a = interfaceC12824fIT;
}
@Override // o.WYJ
public final Object instantiateItem(ViewGroup viewGroup, final int i) {
View inflate = this.d.inflate(R.layout.2131559055, viewGroup, false);
VL vl = this.c.get(i);
ItemViewHolder itemViewHolder = new ItemViewHolder(inflate);
if (vl != null) {
itemViewHolder.title.setText(vl.c);
itemViewHolder.fund.setText(vl.a);
itemViewHolder.background.setTag("TAG_ACCOUNT_SOURCE_ADAPTER".concat(String.valueOf(i)));
if (this.e == i) {
itemViewHolder.background.setBackground(nMh.getDrawable(this.b, R.drawable.rounded_purple_view_pager));
} else {
itemViewHolder.background.setBackground(nMh.getDrawable(this.b, R.drawable.bg_white_rounded));
}
if (this.c.size() > 1) {
itemViewHolder.background.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.ezS
private ProxySourceAdapter a;
private int b;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
ProxySourceAdapter.c(this.a, this.b);
}
{
this.a = this;
this.b = i;
}
});
}
}
viewGroup.addView(inflate, 0);
return inflate;
}
@Override // o.WYJ
public final int getCount() {
return this.c.size();
}
@Override // o.WYJ
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
viewGroup.removeView((View) obj);
}
/* loaded from: classes5.dex */
static class ItemViewHolder extends RecyclerView.zJl {
@BindView
LinearLayout background;
private View c;
@BindView
TextView fund;
@BindView
TextView title;
ItemViewHolder(View view) {
super(view);
this.c = view;
ButterKnife.c(this, view);
}
}
public static /* synthetic */ void c(ProxySourceAdapter proxySourceAdapter, int i) {
InterfaceC12824fIT interfaceC12824fIT = proxySourceAdapter.a;
if (interfaceC12824fIT != null) {
interfaceC12824fIT.a(i);
}
}
}