what-the-bank/sources/com/scb/phone/view/adapter/easycash/EasycashLoanTrackAdapter.java

493 lines
18 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.easycash;
import android.content.Context;
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 java.util.List;
import o.C14957gcv;
import o.LI;
import o.LL;
import o.LP;
import o.LQ;
import o.LR;
import o.nMh;
import o.pyT;
/* loaded from: classes5.dex */
public final class EasycashLoanTrackAdapter extends RecyclerView.Sts<RecyclerView.zJl> {
private final List<LP> e;
/* loaded from: classes5.dex */
public final class LoanInfoHeaderViewHolder_ViewBinding implements Unbinder {
private LoanInfoHeaderViewHolder e;
public LoanInfoHeaderViewHolder_ViewBinding(LoanInfoHeaderViewHolder loanInfoHeaderViewHolder, View view) {
this.e = loanInfoHeaderViewHolder;
loanInfoHeaderViewHolder.textHeader = (TextView) pyT.e(view, R.id.text_loan_header, "field 'textHeader'", TextView.class);
loanInfoHeaderViewHolder.textSubHeader = (TextView) pyT.e(view, R.id.text_loan_sub_header, "field 'textSubHeader'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
LoanInfoHeaderViewHolder loanInfoHeaderViewHolder = this.e;
if (loanInfoHeaderViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
loanInfoHeaderViewHolder.textHeader = null;
loanInfoHeaderViewHolder.textSubHeader = null;
}
}
/* loaded from: classes5.dex */
public final class LoanInfoItemHeaderViewHolder_ViewBinding implements Unbinder {
private LoanInfoItemHeaderViewHolder d;
public LoanInfoItemHeaderViewHolder_ViewBinding(LoanInfoItemHeaderViewHolder loanInfoItemHeaderViewHolder, View view) {
this.d = loanInfoItemHeaderViewHolder;
loanInfoItemHeaderViewHolder.textHeader = (TextView) pyT.e(view, R.id.text_loan_item_header, "field 'textHeader'", TextView.class);
loanInfoItemHeaderViewHolder.textSubHeader = (TextView) pyT.e(view, R.id.text_loan_item_sub_header, "field 'textSubHeader'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
LoanInfoItemHeaderViewHolder loanInfoItemHeaderViewHolder = this.d;
if (loanInfoItemHeaderViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
loanInfoItemHeaderViewHolder.textHeader = null;
loanInfoItemHeaderViewHolder.textSubHeader = null;
}
}
/* loaded from: classes5.dex */
public final class LoanInfoItemBodyViewHolder_ViewBinding implements Unbinder {
private LoanInfoItemBodyViewHolder e;
public LoanInfoItemBodyViewHolder_ViewBinding(LoanInfoItemBodyViewHolder loanInfoItemBodyViewHolder, View view) {
this.e = loanInfoItemBodyViewHolder;
loanInfoItemBodyViewHolder.lineUpper = pyT.a(view, R.id.view_upper_line, "field 'lineUpper'");
loanInfoItemBodyViewHolder.lineLower = pyT.a(view, R.id.view_lower_line, "field 'lineLower'");
loanInfoItemBodyViewHolder.dotInActive = pyT.a(view, R.id.view_dot_inactive, "field 'dotInActive'");
loanInfoItemBodyViewHolder.dotActive = pyT.a(view, R.id.view_dot_active, "field 'dotActive'");
loanInfoItemBodyViewHolder.textActive = (TextView) pyT.e(view, R.id.text_dot_active, "field 'textActive'", TextView.class);
loanInfoItemBodyViewHolder.textLoanTitle = (TextView) pyT.e(view, R.id.text_loan_item_title, "field 'textLoanTitle'", TextView.class);
loanInfoItemBodyViewHolder.textLoanDescription = (TextView) pyT.e(view, R.id.text_loan_description, "field 'textLoanDescription'", TextView.class);
loanInfoItemBodyViewHolder.iconLoanStatus = (ImageView) pyT.e(view, R.id.icon_loan_status, "field 'iconLoanStatus'", ImageView.class);
loanInfoItemBodyViewHolder.dividerBottom = pyT.a(view, R.id.view_divider_bottom, "field 'dividerBottom'");
loanInfoItemBodyViewHolder.paddingBottom = pyT.a(view, R.id.view_padding_bottom, "field 'paddingBottom'");
}
@Override // butterknife.Unbinder
public final void a() {
LoanInfoItemBodyViewHolder loanInfoItemBodyViewHolder = this.e;
if (loanInfoItemBodyViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
loanInfoItemBodyViewHolder.lineUpper = null;
loanInfoItemBodyViewHolder.lineLower = null;
loanInfoItemBodyViewHolder.dotInActive = null;
loanInfoItemBodyViewHolder.dotActive = null;
loanInfoItemBodyViewHolder.textActive = null;
loanInfoItemBodyViewHolder.textLoanTitle = null;
loanInfoItemBodyViewHolder.textLoanDescription = null;
loanInfoItemBodyViewHolder.iconLoanStatus = null;
loanInfoItemBodyViewHolder.dividerBottom = null;
loanInfoItemBodyViewHolder.paddingBottom = null;
}
}
/* JADX WARN: Multi-variable type inference failed */
public EasycashLoanTrackAdapter(List<? extends LP> list) {
C14957gcv.e(list, "");
this.e = list;
}
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemViewType(int i) {
LP lp = this.e.get(i);
if (lp instanceof LI) {
return 0;
}
if (lp instanceof LQ) {
return 1;
}
if (lp instanceof LL) {
return 2;
}
return super.getItemViewType(i);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
if (i == 0) {
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559173, viewGroup, false);
C14957gcv.c(inflate, "");
return new LoanInfoHeaderViewHolder(inflate);
}
if (i == 1) {
View inflate2 = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559175, viewGroup, false);
C14957gcv.c(inflate2, "");
return new LoanInfoItemHeaderViewHolder(inflate2);
}
View inflate3 = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559174, viewGroup, false);
C14957gcv.c(inflate3, "");
return new LoanInfoItemBodyViewHolder(inflate3);
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r11v11, types: [android.view.View] */
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final void onBindViewHolder(RecyclerView.zJl zjl, int i) {
C14957gcv.e(zjl, "");
LP lp = this.e.get(i);
int itemViewType = getItemViewType(i);
TextView textView = null;
if (itemViewType == 0) {
LoanInfoHeaderViewHolder loanInfoHeaderViewHolder = (LoanInfoHeaderViewHolder) zjl;
C14957gcv.d(lp, "");
LI li = (LI) lp;
C14957gcv.e(li, "");
TextView textView2 = loanInfoHeaderViewHolder.textHeader;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(li.d);
if (li.e.length() > 0) {
TextView textView3 = loanInfoHeaderViewHolder.textSubHeader;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setVisibility(0);
TextView textView4 = loanInfoHeaderViewHolder.textSubHeader;
if (textView4 != null) {
textView = textView4;
} else {
C14957gcv.a("");
}
textView.setText(li.e);
return;
}
TextView textView5 = loanInfoHeaderViewHolder.textSubHeader;
if (textView5 != null) {
textView = textView5;
} else {
C14957gcv.a("");
}
textView.setVisibility(8);
return;
}
if (itemViewType == 1) {
LoanInfoItemHeaderViewHolder loanInfoItemHeaderViewHolder = (LoanInfoItemHeaderViewHolder) zjl;
C14957gcv.d(lp, "");
LQ lq = (LQ) lp;
C14957gcv.e(lq, "");
TextView textView6 = loanInfoItemHeaderViewHolder.textHeader;
if (textView6 == null) {
C14957gcv.a("");
textView6 = null;
}
textView6.setText(lq.b);
TextView textView7 = loanInfoItemHeaderViewHolder.textSubHeader;
if (textView7 != null) {
textView = textView7;
} else {
C14957gcv.a("");
}
textView.setText(lq.c);
return;
}
if (itemViewType == 2) {
LoanInfoItemBodyViewHolder loanInfoItemBodyViewHolder = (LoanInfoItemBodyViewHolder) zjl;
C14957gcv.d(lp, "");
LL ll = (LL) lp;
boolean z = i != 0 && getItemViewType(i + (-1)) == 2;
boolean z2 = i >= this.e.size() - 1 || getItemViewType(i + 1) != 2;
C14957gcv.e(ll, "");
TextView textView8 = loanInfoItemBodyViewHolder.textLoanTitle;
if (textView8 == null) {
C14957gcv.a("");
textView8 = null;
}
textView8.setText(ll.a);
TextView textView9 = loanInfoItemBodyViewHolder.textLoanDescription;
if (textView9 == null) {
C14957gcv.a("");
textView9 = null;
}
textView9.setText(ll.e);
Integer num = ll.b;
if (num != null && num.intValue() > 0) {
View view = loanInfoItemBodyViewHolder.dotActive;
if (view == null) {
C14957gcv.a("");
view = null;
}
view.setVisibility(0);
View view2 = loanInfoItemBodyViewHolder.dotInActive;
if (view2 == null) {
C14957gcv.a("");
view2 = null;
}
view2.setVisibility(8);
TextView textView10 = loanInfoItemBodyViewHolder.textActive;
if (textView10 == null) {
C14957gcv.a("");
textView10 = null;
}
textView10.setText(String.valueOf(num));
} else {
View view3 = loanInfoItemBodyViewHolder.dotActive;
if (view3 == null) {
C14957gcv.a("");
view3 = null;
}
view3.setVisibility(8);
View view4 = loanInfoItemBodyViewHolder.dotInActive;
if (view4 == null) {
C14957gcv.a("");
view4 = null;
}
view4.setVisibility(0);
}
if (ll.d) {
ImageView imageView = loanInfoItemBodyViewHolder.iconLoanStatus;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
imageView.setAlpha(1.0f);
TextView textView11 = loanInfoItemBodyViewHolder.textLoanTitle;
if (textView11 == null) {
C14957gcv.a("");
textView11 = null;
}
textView11.setTextColor(loanInfoItemBodyViewHolder.c);
TextView textView12 = loanInfoItemBodyViewHolder.textLoanDescription;
if (textView12 == null) {
C14957gcv.a("");
textView12 = null;
}
textView12.setTextColor(loanInfoItemBodyViewHolder.b);
} else {
ImageView imageView2 = loanInfoItemBodyViewHolder.iconLoanStatus;
if (imageView2 == null) {
C14957gcv.a("");
imageView2 = null;
}
imageView2.setAlpha(0.5f);
TextView textView13 = loanInfoItemBodyViewHolder.textLoanTitle;
if (textView13 == null) {
C14957gcv.a("");
textView13 = null;
}
textView13.setTextColor(loanInfoItemBodyViewHolder.a);
TextView textView14 = loanInfoItemBodyViewHolder.textLoanDescription;
if (textView14 == null) {
C14957gcv.a("");
textView14 = null;
}
textView14.setTextColor(loanInfoItemBodyViewHolder.a);
}
LR lr = ll.c;
ImageView imageView3 = loanInfoItemBodyViewHolder.iconLoanStatus;
if (imageView3 == null) {
C14957gcv.a("");
imageView3 = null;
}
imageView3.setVisibility(0);
int i2 = LoanInfoItemBodyViewHolder.RVV.c[lr.ordinal()];
if (i2 == 1) {
imageView3.setImageResource(R.drawable.ic_gift_background_check);
} else if (i2 == 2) {
imageView3.setImageResource(R.drawable.icon_error);
} else if (i2 == 3) {
imageView3.setImageResource(R.drawable.ic_loan_alert);
} else if (i2 == 4) {
imageView3.setImageResource(R.drawable.ic_onprocess);
} else {
imageView3.setVisibility(4);
}
View view5 = loanInfoItemBodyViewHolder.lineUpper;
if (view5 == null) {
C14957gcv.a("");
view5 = null;
}
view5.setVisibility(z ? 0 : 4);
View view6 = loanInfoItemBodyViewHolder.lineLower;
if (view6 == null) {
C14957gcv.a("");
view6 = null;
}
view6.setVisibility(z2 ? 4 : 0);
View view7 = loanInfoItemBodyViewHolder.dividerBottom;
if (view7 == null) {
C14957gcv.a("");
view7 = null;
}
view7.setVisibility(z2 ? 0 : 8);
?? r11 = loanInfoItemBodyViewHolder.paddingBottom;
if (r11 != 0) {
textView = r11;
} else {
C14957gcv.a("");
}
textView.setVisibility(z2 ? 0 : 8);
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.e.size();
}
/* loaded from: classes5.dex */
public static final class LoanInfoHeaderViewHolder extends RecyclerView.zJl {
@BindView
public TextView textHeader;
@BindView
public TextView textSubHeader;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LoanInfoHeaderViewHolder(View view) {
super(view);
C14957gcv.e(view, "");
ButterKnife.c(this, view);
}
}
/* loaded from: classes5.dex */
public static final class LoanInfoItemHeaderViewHolder extends RecyclerView.zJl {
@BindView
public TextView textHeader;
@BindView
public TextView textSubHeader;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LoanInfoItemHeaderViewHolder(View view) {
super(view);
C14957gcv.e(view, "");
ButterKnife.c(this, view);
}
}
/* loaded from: classes5.dex */
public static final class LoanInfoItemBodyViewHolder extends RecyclerView.zJl {
int a;
final int b;
final int c;
@BindView
public View dividerBottom;
@BindView
public View dotActive;
@BindView
public View dotInActive;
@BindView
public ImageView iconLoanStatus;
@BindView
public View lineLower;
@BindView
public View lineUpper;
@BindView
public View paddingBottom;
@BindView
public TextView textActive;
@BindView
public TextView textLoanDescription;
@BindView
public TextView textLoanTitle;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LoanInfoItemBodyViewHolder(View view) {
super(view);
C14957gcv.e(view, "");
ButterKnife.c(this, view);
Context context = view.getContext();
this.a = nMh.getColor(context, R.color.f3412131099849);
this.c = nMh.getColor(context, R.color.f13682131100876);
this.b = nMh.getColor(context, R.color.f2982131099805);
}
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
/* loaded from: classes5.dex */
public final /* synthetic */ class RVV {
public static final int[] c;
static {
int[] iArr = new int[LR.values().length];
try {
iArr[LR.CHECK.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[LR.ERROR.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[LR.ALERT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
iArr[LR.CLOCK.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
c = iArr;
}
}
static {
new Sts((byte) 0);
}
}
static {
new Sts((byte) 0);
}
}