what-the-bank/sources/com/scb/phone/view/adapter/closeaccount/AmountDetailsAdapter.java

142 lines
5.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.closeaccount;
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 java.util.List;
import o.C0512Ii;
import o.QO;
import o.pyT;
/* loaded from: classes5.dex */
public final class AmountDetailsAdapter extends RecyclerView.Sts<DetailViewHolder> {
private List<C0512Ii> e;
/* loaded from: classes5.dex */
public class SuccessRow_ViewBinding implements Unbinder {
private SuccessRow c;
public SuccessRow_ViewBinding(SuccessRow successRow, View view) {
this.c = successRow;
successRow.textTitle = (TextView) pyT.e(view, R.id.tv_title, "field 'textTitle'", TextView.class);
successRow.textAmount = (TextView) pyT.e(view, R.id.tv_amount, "field 'textAmount'", TextView.class);
successRow.viewLine = pyT.a(view, R.id.line, "field 'viewLine'");
}
@Override // butterknife.Unbinder
public final void a() {
SuccessRow successRow = this.c;
if (successRow == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
successRow.textTitle = null;
successRow.textAmount = null;
successRow.viewLine = null;
}
}
/* loaded from: classes5.dex */
public class DetailViewHolder_ViewBinding implements Unbinder {
private DetailViewHolder d;
public DetailViewHolder_ViewBinding(DetailViewHolder detailViewHolder, View view) {
this.d = detailViewHolder;
detailViewHolder.layoutContainer = (LinearLayout) pyT.e(view, R.id.ll_layout_details_container, "field 'layoutContainer'", LinearLayout.class);
detailViewHolder.depositNumber = (TextView) pyT.e(view, R.id.tv_details_container_title, "field 'depositNumber'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
DetailViewHolder detailViewHolder = this.d;
if (detailViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
detailViewHolder.layoutContainer = null;
detailViewHolder.depositNumber = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(DetailViewHolder detailViewHolder, int i) {
DetailViewHolder detailViewHolder2 = detailViewHolder;
C0512Ii c0512Ii = this.e.get(i);
detailViewHolder2.depositNumber.setText(detailViewHolder2.itemView.getContext().getString(R.string.close_account_details_container_title, c0512Ii.b));
detailViewHolder2.layoutContainer.removeAllViews();
int i2 = 0;
while (i2 < c0512Ii.a.size()) {
if (c0512Ii.a.get(i2) instanceof QO) {
View inflate = LayoutInflater.from(detailViewHolder2.itemView.getContext()).inflate(R.layout.2131558949, (ViewGroup) null, false);
QO qo = (QO) c0512Ii.a.get(i2);
SuccessRow successRow = new SuccessRow(inflate);
boolean z = i2 == c0512Ii.a.size() + (-2);
successRow.textTitle.setText(qo.h);
successRow.textAmount.setText(qo.f);
if (z) {
ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) successRow.viewLine.getLayoutParams();
marginLayoutParams.setMargins(0, 0, 0, 0);
successRow.viewLine.setLayoutParams(marginLayoutParams);
}
detailViewHolder2.layoutContainer.addView(successRow.a);
}
i2++;
}
}
public AmountDetailsAdapter(List<C0512Ii> list) {
this.e = list;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.e.size();
}
/* loaded from: classes5.dex */
protected static class DetailViewHolder extends RecyclerView.zJl {
@BindView
TextView depositNumber;
@BindView
LinearLayout layoutContainer;
DetailViewHolder(View view) {
super(view);
ButterKnife.c(this, view);
}
}
/* loaded from: classes5.dex */
protected static class SuccessRow {
View a;
@BindView
TextView textAmount;
@BindView
TextView textTitle;
@BindView
View viewLine;
SuccessRow(View view) {
ButterKnife.c(this, view);
this.a = view;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ DetailViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
return new DetailViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131558948, viewGroup, false));
}
}