160 lines
5.8 KiB
Java
160 lines
5.8 KiB
Java
|
package com.scb.phone.view.adapter;
|
||
|
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
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.BaseHorizontalBubbleAdapter;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import o.pyT;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class BaseHorizontalBubbleAdapter extends RecyclerView.Sts {
|
||
|
public int b = -1;
|
||
|
private RVV d;
|
||
|
public List<Integer> e;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public interface RVV {
|
||
|
void e(View view, int i);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class SelectedItemHolder_ViewBinding implements Unbinder {
|
||
|
private SelectedItemHolder b;
|
||
|
|
||
|
public SelectedItemHolder_ViewBinding(SelectedItemHolder selectedItemHolder, View view) {
|
||
|
this.b = selectedItemHolder;
|
||
|
selectedItemHolder.amount = (TextView) pyT.e(view, R.id.amount_text_view, "field 'amount'", TextView.class);
|
||
|
selectedItemHolder.container = (RelativeLayout) pyT.e(view, R.id.amount_container_relative_layout, "field 'container'", RelativeLayout.class);
|
||
|
}
|
||
|
|
||
|
@Override // butterknife.Unbinder
|
||
|
public final void a() {
|
||
|
SelectedItemHolder selectedItemHolder = this.b;
|
||
|
if (selectedItemHolder == null) {
|
||
|
throw new IllegalStateException("Bindings already cleared.");
|
||
|
}
|
||
|
this.b = null;
|
||
|
selectedItemHolder.amount = null;
|
||
|
selectedItemHolder.container = null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public BaseHorizontalBubbleAdapter(List<Integer> list, RVV rvv) {
|
||
|
new ArrayList();
|
||
|
this.e = list;
|
||
|
this.d = rvv;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||
|
if (i == 0) {
|
||
|
return new SelectedItemHolder(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559068, viewGroup, false));
|
||
|
}
|
||
|
if (i == 2) {
|
||
|
return new IeS(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559069, viewGroup, false));
|
||
|
}
|
||
|
if (i == 3) {
|
||
|
return new SelectedItemHolder(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559250, viewGroup, false));
|
||
|
}
|
||
|
if (i == 4) {
|
||
|
return new LWm(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559249, viewGroup, false));
|
||
|
}
|
||
|
if (i == 5) {
|
||
|
return new IeS(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559251, viewGroup, false));
|
||
|
}
|
||
|
return new LWm(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559067, viewGroup, false));
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public void onBindViewHolder(RecyclerView.zJl zjl, final int i) {
|
||
|
SelectedItemHolder selectedItemHolder = (SelectedItemHolder) zjl;
|
||
|
selectedItemHolder.amount.setText(String.valueOf(this.e.get(i)));
|
||
|
if (zjl instanceof IeS) {
|
||
|
return;
|
||
|
}
|
||
|
selectedItemHolder.container.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.eqG
|
||
|
private int b;
|
||
|
private BaseHorizontalBubbleAdapter c;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
BaseHorizontalBubbleAdapter.c(this.c, this.b, view);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
this.b = i;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public int getItemCount() {
|
||
|
return this.e.size();
|
||
|
}
|
||
|
|
||
|
public final Double e() {
|
||
|
return Double.valueOf(this.b >= 0 ? this.e.get(r0).intValue() : 0.0d);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
class LWm extends SelectedItemHolder {
|
||
|
private BaseHorizontalBubbleAdapter c;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
LWm(BaseHorizontalBubbleAdapter baseHorizontalBubbleAdapter, View view) {
|
||
|
super(baseHorizontalBubbleAdapter, view);
|
||
|
this.c = baseHorizontalBubbleAdapter;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
class IeS extends SelectedItemHolder {
|
||
|
private BaseHorizontalBubbleAdapter a;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
IeS(BaseHorizontalBubbleAdapter baseHorizontalBubbleAdapter, View view) {
|
||
|
super(baseHorizontalBubbleAdapter, view);
|
||
|
this.a = baseHorizontalBubbleAdapter;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
class SelectedItemHolder extends RecyclerView.zJl {
|
||
|
|
||
|
@BindView
|
||
|
TextView amount;
|
||
|
private BaseHorizontalBubbleAdapter c;
|
||
|
|
||
|
@BindView
|
||
|
RelativeLayout container;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
SelectedItemHolder(BaseHorizontalBubbleAdapter baseHorizontalBubbleAdapter, View view) {
|
||
|
super(view);
|
||
|
this.c = baseHorizontalBubbleAdapter;
|
||
|
ButterKnife.c(this, view);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void c(BaseHorizontalBubbleAdapter baseHorizontalBubbleAdapter, int i, View view) {
|
||
|
if (baseHorizontalBubbleAdapter.b != i) {
|
||
|
baseHorizontalBubbleAdapter.b = i;
|
||
|
baseHorizontalBubbleAdapter.notifyDataSetChanged();
|
||
|
RVV rvv = baseHorizontalBubbleAdapter.d;
|
||
|
if (rvv != null) {
|
||
|
rvv.e(view, i);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|