168 lines
5.6 KiB
Java
168 lines
5.6 KiB
Java
|
package com.scb.phone.view.adapter.landingpage;
|
||
|
|
||
|
import android.util.SparseBooleanArray;
|
||
|
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.landingpage.UnselectedTileAdapter;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import o.C0914Rk;
|
||
|
import o.C12891fKc;
|
||
|
import o.nMh;
|
||
|
import o.pyT;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class UnselectedTileAdapter extends RecyclerView.Sts<Holder> {
|
||
|
private final IeS c;
|
||
|
private final SparseBooleanArray b = new SparseBooleanArray();
|
||
|
public final List<C0914Rk> d = new ArrayList();
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public interface IeS {
|
||
|
void e(List<C0914Rk> list);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public interface LWm {
|
||
|
void d(boolean z, int i);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class Holder_ViewBinding implements Unbinder {
|
||
|
private Holder c;
|
||
|
|
||
|
public Holder_ViewBinding(Holder holder, View view) {
|
||
|
this.c = holder;
|
||
|
holder.text1 = (TextView) pyT.e(view, R.id.text_1, "field 'text1'", TextView.class);
|
||
|
holder.text2 = (TextView) pyT.e(view, R.id.text_2, "field 'text2'", TextView.class);
|
||
|
holder.backgroundImageView = (ImageView) pyT.e(view, R.id.image_background, "field 'backgroundImageView'", ImageView.class);
|
||
|
holder.checkImageView = (ImageView) pyT.e(view, R.id.iv_check, "field 'checkImageView'", ImageView.class);
|
||
|
}
|
||
|
|
||
|
@Override // butterknife.Unbinder
|
||
|
public final void a() {
|
||
|
Holder holder = this.c;
|
||
|
if (holder == null) {
|
||
|
throw new IllegalStateException("Bindings already cleared.");
|
||
|
}
|
||
|
this.c = null;
|
||
|
holder.text1 = null;
|
||
|
holder.text2 = null;
|
||
|
holder.backgroundImageView = null;
|
||
|
holder.checkImageView = null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final /* synthetic */ void onBindViewHolder(Holder holder, int i) {
|
||
|
Holder holder2 = holder;
|
||
|
C0914Rk c0914Rk = this.d.get(i);
|
||
|
boolean z = this.b.get(i);
|
||
|
holder2.e = c0914Rk;
|
||
|
holder2.d = z;
|
||
|
holder2.text1.setText(c0914Rk.e);
|
||
|
holder2.text2.setText(c0914Rk.d);
|
||
|
holder2.text1.setTextColor(nMh.getColor(holder2.itemView.getContext(), c0914Rk.c));
|
||
|
holder2.text2.setTextColor(nMh.getColor(holder2.itemView.getContext(), c0914Rk.c));
|
||
|
C12891fKc.azB_(holder2.backgroundImageView.getContext(), R.color.f3092131099816, holder2.backgroundImageView, c0914Rk.b);
|
||
|
holder2.checkImageView.setSelected(z);
|
||
|
}
|
||
|
|
||
|
public UnselectedTileAdapter(IeS ieS) {
|
||
|
this.c = ieS;
|
||
|
}
|
||
|
|
||
|
public final List<C0914Rk> d() {
|
||
|
ArrayList arrayList = new ArrayList();
|
||
|
for (int i = 0; i < this.d.size(); i++) {
|
||
|
if (this.b.get(i)) {
|
||
|
arrayList.add(this.d.get(i));
|
||
|
}
|
||
|
}
|
||
|
return arrayList;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final int getItemCount() {
|
||
|
return this.d.size();
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public static class Holder extends RecyclerView.zJl {
|
||
|
private LWm a;
|
||
|
|
||
|
@BindView
|
||
|
ImageView backgroundImageView;
|
||
|
|
||
|
@BindView
|
||
|
ImageView checkImageView;
|
||
|
boolean d;
|
||
|
C0914Rk e;
|
||
|
|
||
|
@BindView
|
||
|
TextView text1;
|
||
|
|
||
|
@BindView
|
||
|
TextView text2;
|
||
|
|
||
|
public Holder(ViewGroup viewGroup, final LWm lWm) {
|
||
|
super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131560054, viewGroup, false));
|
||
|
this.a = lWm;
|
||
|
ButterKnife.c(this, this.itemView);
|
||
|
this.itemView.setOnClickListener(new View.OnClickListener(this, lWm) { // from class: o.ewC
|
||
|
private UnselectedTileAdapter.LWm c;
|
||
|
private UnselectedTileAdapter.Holder e;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
UnselectedTileAdapter.Holder.a(this.e, this.c);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = this;
|
||
|
this.c = lWm;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void a(Holder holder, LWm lWm) {
|
||
|
boolean z = !holder.d;
|
||
|
holder.d = z;
|
||
|
holder.checkImageView.setVisibility(z ? 0 : 8);
|
||
|
boolean z2 = holder.d;
|
||
|
int adapterPosition = holder.getAdapterPosition();
|
||
|
C0914Rk c0914Rk = holder.e;
|
||
|
lWm.d(z2, adapterPosition);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void c(UnselectedTileAdapter unselectedTileAdapter, boolean z, int i) {
|
||
|
unselectedTileAdapter.b.put(i, z);
|
||
|
unselectedTileAdapter.c.e(unselectedTileAdapter.d());
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final /* synthetic */ Holder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||
|
return new Holder(viewGroup, new LWm(this) { // from class: o.ewB
|
||
|
private UnselectedTileAdapter c;
|
||
|
|
||
|
@Override // com.scb.phone.view.adapter.landingpage.UnselectedTileAdapter.LWm
|
||
|
public final void d(boolean z, int i2) {
|
||
|
UnselectedTileAdapter.c(this.c, z, i2);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|