what-the-bank/sources/com/scb/phone/view/activity/debitatm/DebitTransactionAdapter.java

292 lines
12 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.activity.debitatm;
import android.content.Context;
import android.graphics.PorterDuff;
import android.text.TextUtils;
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.BaseExpandableRecycleViewAdapter;
import java.util.ArrayList;
import java.util.List;
import o.AbstractC5347brN;
import o.C1040Uh;
import o.C1062Uu;
import o.nMh;
import o.pyT;
/* loaded from: classes4.dex */
public final class DebitTransactionAdapter extends BaseExpandableRecycleViewAdapter {
private boolean a;
private Context d;
public List<C1062Uu> e;
/* loaded from: classes4.dex */
public class ChildViewHolder_ViewBinding implements Unbinder {
private ChildViewHolder d;
public ChildViewHolder_ViewBinding(ChildViewHolder childViewHolder, View view) {
this.d = childViewHolder;
childViewHolder.description = (TextView) pyT.e(view, R.id.unbilled_description_value, "field 'description'", TextView.class);
childViewHolder.titleDescription = (TextView) pyT.e(view, R.id.description_text_view, "field 'titleDescription'", TextView.class);
childViewHolder.titlePostDate = (TextView) pyT.e(view, R.id.post_date_text_view, "field 'titlePostDate'", TextView.class);
childViewHolder.postDate = (TextView) pyT.e(view, R.id.unbilled_post_date_value, "field 'postDate'", TextView.class);
childViewHolder.originalCurrency = (TextView) pyT.e(view, R.id.original_currency_text_view, "field 'originalCurrency'", TextView.class);
childViewHolder.foreignCurrency = (TextView) pyT.e(view, R.id.unbilled_foreign_currency_value, "field 'foreignCurrency'", TextView.class);
childViewHolder.titleCategory = (TextView) pyT.e(view, R.id.categories_text_view, "field 'titleCategory'", TextView.class);
childViewHolder.category = (TextView) pyT.e(view, R.id.unbilled_category_value, "field 'category'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ChildViewHolder childViewHolder = this.d;
if (childViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
childViewHolder.description = null;
childViewHolder.titleDescription = null;
childViewHolder.titlePostDate = null;
childViewHolder.postDate = null;
childViewHolder.originalCurrency = null;
childViewHolder.foreignCurrency = null;
childViewHolder.titleCategory = null;
childViewHolder.category = null;
}
}
/* loaded from: classes4.dex */
public class ParentViewHolder_ViewBinding extends BaseExpandableRecycleViewAdapter.BaseParentViewHolder_ViewBinding {
private ParentViewHolder b;
public ParentViewHolder_ViewBinding(ParentViewHolder parentViewHolder, View view) {
super(parentViewHolder, view);
this.b = parentViewHolder;
parentViewHolder.containerPrepaid = (RelativeLayout) pyT.e(view, R.id.billed_detail_container, "field 'containerPrepaid'", RelativeLayout.class);
parentViewHolder.titlePrepaid = (TextView) pyT.e(view, R.id.billed_detail_title, "field 'titlePrepaid'", TextView.class);
parentViewHolder.valuePrepaid = (TextView) pyT.e(view, R.id.billed_detail_value, "field 'valuePrepaid'", TextView.class);
parentViewHolder.datePrepaid = (TextView) pyT.e(view, R.id.billed_detail_date, "field 'datePrepaid'", TextView.class);
parentViewHolder.billedPending = (TextView) pyT.e(view, R.id.billed_pending, "field 'billedPending'", TextView.class);
parentViewHolder.expandIconImageView = (ImageView) pyT.e(view, R.id.expand_icon_image_view, "field 'expandIconImageView'", ImageView.class);
parentViewHolder.linePrepaid = pyT.a(view, R.id.billed_line, "field 'linePrepaid'");
parentViewHolder.verticalLinePrepaid = pyT.a(view, R.id.billed_vertical_line_view, "field 'verticalLinePrepaid'");
}
@Override // com.scb.phone.view.adapter.BaseExpandableRecycleViewAdapter.BaseParentViewHolder_ViewBinding, butterknife.Unbinder
public final void a() {
ParentViewHolder parentViewHolder = this.b;
if (parentViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.b = null;
parentViewHolder.containerPrepaid = null;
parentViewHolder.titlePrepaid = null;
parentViewHolder.valuePrepaid = null;
parentViewHolder.datePrepaid = null;
parentViewHolder.billedPending = null;
parentViewHolder.expandIconImageView = null;
parentViewHolder.linePrepaid = null;
parentViewHolder.verticalLinePrepaid = null;
super.a();
}
}
public DebitTransactionAdapter(Context context) {
super(context);
this.e = new ArrayList();
this.a = false;
}
@Override // o.Qpt
public final int d() {
return this.e.size();
}
@Override // o.pvT, o.Qpt
public final int c(int i) {
return i < this.e.size() ? 1 : 0;
}
@Override // o.Qpt
public final RecyclerView.zJl anX_(ViewGroup viewGroup, int i) {
this.d = viewGroup.getContext();
LayoutInflater from = LayoutInflater.from(viewGroup.getContext());
if (i == 1) {
return new ParentViewHolder(from.inflate(R.layout.2131559086, viewGroup, false));
}
return new Sts(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559248, viewGroup, false));
}
@Override // o.Qpt
public final RecyclerView.zJl anW_(ViewGroup viewGroup, int i) {
return new ChildViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559091, viewGroup, false));
}
@Override // o.Qpt
public final void d(RecyclerView.zJl zjl, int i) {
if (zjl instanceof ParentViewHolder) {
ParentViewHolder parentViewHolder = (ParentViewHolder) zjl;
C1062Uu c1062Uu = this.e.get(i);
if (c1062Uu == null) {
parentViewHolder.titlePrepaid.setText("Loading");
return;
}
parentViewHolder.titlePrepaid.setText(c1062Uu.a);
parentViewHolder.datePrepaid.setText(c1062Uu.h);
if ("C".equalsIgnoreCase(c1062Uu.j)) {
TextView textView = parentViewHolder.valuePrepaid;
StringBuilder sb = new StringBuilder("+");
sb.append(c1062Uu.i);
textView.setText(sb.toString());
parentViewHolder.valuePrepaid.setTextColor(nMh.getColor(this.b, R.color.f3432131099851));
} else {
TextView textView2 = parentViewHolder.valuePrepaid;
StringBuilder sb2 = new StringBuilder("-");
sb2.append(c1062Uu.i);
textView2.setText(sb2.toString());
parentViewHolder.valuePrepaid.setTextColor(nMh.getColor(this.b, R.color.f3462131099854));
}
if (i > 0 && i < this.e.size()) {
parentViewHolder.linePrepaid.setVisibility(0);
} else {
parentViewHolder.linePrepaid.setVisibility(4);
}
if (i == this.e.size() - 1) {
parentViewHolder.verticalLinePrepaid.setVisibility(8);
} else {
parentViewHolder.verticalLinePrepaid.setVisibility(0);
}
if ("A".equalsIgnoreCase(c1062Uu.f8400o)) {
parentViewHolder.billedPending.setVisibility(0);
parentViewHolder.expandIconImageView.setColorFilter(nMh.getColor(this.b, R.color.f3412131099849), PorterDuff.Mode.SRC_ATOP);
parentViewHolder.titlePrepaid.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
parentViewHolder.datePrepaid.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
parentViewHolder.valuePrepaid.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
}
BaseExpandableRecycleViewAdapter.a(parentViewHolder);
}
}
@Override // o.Qpt
public final void c(RecyclerView.zJl zjl, int i, int i2) {
if (zjl instanceof ChildViewHolder) {
ChildViewHolder childViewHolder = (ChildViewHolder) zjl;
C1062Uu c1062Uu = this.e.get(i);
TextView textView = childViewHolder.category;
C1040Uh c1040Uh = c1062Uu.e;
textView.setText(c1040Uh != null ? c1040Uh.a : null);
childViewHolder.description.setText(c1062Uu.a);
if ("THB".equalsIgnoreCase(c1062Uu.c) || TextUtils.isEmpty(c1062Uu.c)) {
childViewHolder.originalCurrency.setVisibility(8);
childViewHolder.foreignCurrency.setVisibility(8);
} else {
childViewHolder.originalCurrency.setVisibility(0);
childViewHolder.foreignCurrency.setVisibility(0);
TextView textView2 = childViewHolder.foreignCurrency;
StringBuilder sb = new StringBuilder();
sb.append(c1062Uu.c);
sb.append(" ");
sb.append(c1062Uu.b);
textView2.setText(sb.toString());
}
childViewHolder.postDate.setText(c1062Uu.g);
if ("A".equalsIgnoreCase(c1062Uu.f8400o)) {
childViewHolder.titleDescription.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
childViewHolder.description.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
childViewHolder.originalCurrency.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
childViewHolder.foreignCurrency.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
childViewHolder.titlePostDate.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
childViewHolder.postDate.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
childViewHolder.titleCategory.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
childViewHolder.category.setTextColor(nMh.getColor(this.d, R.color.f3412131099849));
}
}
}
@Override // com.scb.phone.view.adapter.BaseExpandableRecycleViewAdapter, o.Qpt
public final boolean b(RecyclerView.zJl zjl) {
return zjl instanceof ParentViewHolder;
}
/* loaded from: classes4.dex */
static class ParentViewHolder extends BaseExpandableRecycleViewAdapter.BaseParentViewHolder {
@BindView
TextView billedPending;
@BindView
RelativeLayout containerPrepaid;
@BindView
TextView datePrepaid;
@BindView
ImageView expandIconImageView;
@BindView
View linePrepaid;
@BindView
TextView titlePrepaid;
@BindView
TextView valuePrepaid;
@BindView
View verticalLinePrepaid;
ParentViewHolder(View view) {
super(view);
ButterKnife.c(this, view);
}
}
/* loaded from: classes4.dex */
static class ChildViewHolder extends AbstractC5347brN {
@BindView
TextView category;
@BindView
TextView description;
@BindView
TextView foreignCurrency;
@BindView
TextView originalCurrency;
@BindView
TextView postDate;
@BindView
TextView titleCategory;
@BindView
TextView titleDescription;
@BindView
TextView titlePostDate;
ChildViewHolder(View view) {
super(view);
ButterKnife.c(this, view);
}
}
/* loaded from: classes4.dex */
static class Sts extends AbstractC5347brN {
Sts(View view) {
super(view);
}
}
}