186 lines
8.3 KiB
Java
186 lines
8.3 KiB
Java
package com.scb.phone.view.adapter.loan;
|
|
|
|
import android.content.Context;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.ImageView;
|
|
import android.widget.LinearLayout;
|
|
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 java.util.ArrayList;
|
|
import java.util.List;
|
|
import o.C0385Fj;
|
|
import o.C12891fKc;
|
|
import o.WYJ;
|
|
import o.nMh;
|
|
import o.pyT;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class LoanDetailAdapter extends WYJ {
|
|
private List<C0385Fj> b;
|
|
private Context c;
|
|
private LayoutInflater d;
|
|
|
|
@Override // o.WYJ
|
|
public final boolean isViewFromObject(View view, Object obj) {
|
|
return view == obj;
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class LoanSummaryDetailViewHolder_ViewBinding implements Unbinder {
|
|
private LoanSummaryDetailViewHolder c;
|
|
|
|
public LoanSummaryDetailViewHolder_ViewBinding(LoanSummaryDetailViewHolder loanSummaryDetailViewHolder, View view) {
|
|
this.c = loanSummaryDetailViewHolder;
|
|
loanSummaryDetailViewHolder.loanTypeImage = (ImageView) pyT.e(view, R.id.custom_loan_type, "field 'loanTypeImage'", ImageView.class);
|
|
loanSummaryDetailViewHolder.loanName = (TextView) pyT.e(view, R.id.loan_name_text_view, "field 'loanName'", TextView.class);
|
|
loanSummaryDetailViewHolder.loanAccountNumber = (TextView) pyT.e(view, R.id.loan_detail_account_number, "field 'loanAccountNumber'", TextView.class);
|
|
loanSummaryDetailViewHolder.outstandingAmount = (TextView) pyT.e(view, R.id.loan_outstanding_amount_text_view, "field 'outstandingAmount'", TextView.class);
|
|
loanSummaryDetailViewHolder.tvOutstanding = (TextView) pyT.e(view, R.id.tv_loan_outstanding, "field 'tvOutstanding'", TextView.class);
|
|
loanSummaryDetailViewHolder.linearLoanOutstanding = (LinearLayout) pyT.e(view, R.id.linear_loan_outstanding, "field 'linearLoanOutstanding'", LinearLayout.class);
|
|
loanSummaryDetailViewHolder.relativeLoanRestricted = (RelativeLayout) pyT.e(view, R.id.relative_loan_restricted, "field 'relativeLoanRestricted'", RelativeLayout.class);
|
|
loanSummaryDetailViewHolder.relativeLoanLevelUpClosed = (RelativeLayout) pyT.e(view, R.id.rl_layout_level_up_loan_closed, "field 'relativeLoanLevelUpClosed'", RelativeLayout.class);
|
|
loanSummaryDetailViewHolder.restrictedImageView = (ImageView) pyT.e(view, R.id.restricted_image_view, "field 'restrictedImageView'", ImageView.class);
|
|
loanSummaryDetailViewHolder.ivLoanUpClosed = (ImageView) pyT.e(view, R.id.iv_level_up_loan_closed, "field 'ivLoanUpClosed'", ImageView.class);
|
|
loanSummaryDetailViewHolder.tvLoanUpClosed = (TextView) pyT.e(view, R.id.tv_level_up_loan_closed, "field 'tvLoanUpClosed'", TextView.class);
|
|
loanSummaryDetailViewHolder.tvLoanRestricted = (TextView) pyT.e(view, R.id.loan_restricted, "field 'tvLoanRestricted'", TextView.class);
|
|
}
|
|
|
|
@Override // butterknife.Unbinder
|
|
public final void a() {
|
|
LoanSummaryDetailViewHolder loanSummaryDetailViewHolder = this.c;
|
|
if (loanSummaryDetailViewHolder == null) {
|
|
throw new IllegalStateException("Bindings already cleared.");
|
|
}
|
|
this.c = null;
|
|
loanSummaryDetailViewHolder.loanTypeImage = null;
|
|
loanSummaryDetailViewHolder.loanName = null;
|
|
loanSummaryDetailViewHolder.loanAccountNumber = null;
|
|
loanSummaryDetailViewHolder.outstandingAmount = null;
|
|
loanSummaryDetailViewHolder.tvOutstanding = null;
|
|
loanSummaryDetailViewHolder.linearLoanOutstanding = null;
|
|
loanSummaryDetailViewHolder.relativeLoanRestricted = null;
|
|
loanSummaryDetailViewHolder.relativeLoanLevelUpClosed = null;
|
|
loanSummaryDetailViewHolder.restrictedImageView = null;
|
|
loanSummaryDetailViewHolder.ivLoanUpClosed = null;
|
|
loanSummaryDetailViewHolder.tvLoanUpClosed = null;
|
|
loanSummaryDetailViewHolder.tvLoanRestricted = null;
|
|
}
|
|
}
|
|
|
|
public LoanDetailAdapter(Context context, List<C0385Fj> list) {
|
|
this.d = (LayoutInflater) context.getSystemService("layout_inflater");
|
|
this.c = context;
|
|
this.b = list == null ? new ArrayList<>() : list;
|
|
}
|
|
|
|
@Override // o.WYJ
|
|
public final int getCount() {
|
|
return this.b.size();
|
|
}
|
|
|
|
@Override // o.WYJ
|
|
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
|
|
viewGroup.removeView((View) obj);
|
|
}
|
|
|
|
@Override // o.WYJ
|
|
public final Object instantiateItem(ViewGroup viewGroup, int i) {
|
|
C0385Fj c0385Fj = this.b.get(i);
|
|
LoanSummaryDetailViewHolder loanSummaryDetailViewHolder = new LoanSummaryDetailViewHolder(this.d.inflate(R.layout.2131559263, (ViewGroup) null));
|
|
C12891fKc.azt_(nMh.getDrawable(this.c, c0385Fj.u), loanSummaryDetailViewHolder.loanTypeImage, c0385Fj.K);
|
|
loanSummaryDetailViewHolder.loanName.setText(c0385Fj.A);
|
|
loanSummaryDetailViewHolder.loanAccountNumber.setText(c0385Fj.b);
|
|
loanSummaryDetailViewHolder.outstandingAmount.setText(c0385Fj.S);
|
|
if (c0385Fj.p && !c0385Fj.l) {
|
|
loanSummaryDetailViewHolder.outstandingAmount.setVisibility(0);
|
|
loanSummaryDetailViewHolder.relativeLoanLevelUpClosed.setVisibility(8);
|
|
loanSummaryDetailViewHolder.tvOutstanding.setVisibility(0);
|
|
loanSummaryDetailViewHolder.tvOutstanding.setText(c0385Fj.z);
|
|
loanSummaryDetailViewHolder.outstandingAmount.setText(c0385Fj.P);
|
|
} else if (c0385Fj.p) {
|
|
loanSummaryDetailViewHolder.tvOutstanding.setVisibility(4);
|
|
loanSummaryDetailViewHolder.outstandingAmount.setVisibility(4);
|
|
loanSummaryDetailViewHolder.relativeLoanLevelUpClosed.setVisibility(0);
|
|
C12891fKc.azn_(nMh.getDrawable(this.c, c0385Fj.r), loanSummaryDetailViewHolder.ivLoanUpClosed, c0385Fj.a);
|
|
loanSummaryDetailViewHolder.tvLoanUpClosed.setText(c0385Fj.O);
|
|
} else {
|
|
loanSummaryDetailViewHolder.relativeLoanLevelUpClosed.setVisibility(8);
|
|
loanSummaryDetailViewHolder.outstandingAmount.setVisibility(0);
|
|
loanSummaryDetailViewHolder.tvOutstanding.setVisibility(0);
|
|
loanSummaryDetailViewHolder.tvOutstanding.setText(R.string.loan_amount_label);
|
|
}
|
|
if (c0385Fj.q || c0385Fj.t) {
|
|
loanSummaryDetailViewHolder.linearLoanOutstanding.setVisibility(4);
|
|
loanSummaryDetailViewHolder.relativeLoanRestricted.setVisibility(0);
|
|
int i2 = c0385Fj.r;
|
|
String str = c0385Fj.a;
|
|
String str2 = c0385Fj.H;
|
|
if (c0385Fj.t) {
|
|
loanSummaryDetailViewHolder.tvLoanRestricted.setText(str2);
|
|
i2 = R.drawable.ic_loan_alert;
|
|
str = "";
|
|
}
|
|
C12891fKc.azm_(i2, loanSummaryDetailViewHolder.restrictedImageView, str);
|
|
} else {
|
|
loanSummaryDetailViewHolder.linearLoanOutstanding.setVisibility(0);
|
|
loanSummaryDetailViewHolder.relativeLoanRestricted.setVisibility(8);
|
|
}
|
|
viewGroup.addView(loanSummaryDetailViewHolder.c, 0);
|
|
return loanSummaryDetailViewHolder.c;
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
static class LoanSummaryDetailViewHolder extends RecyclerView.zJl {
|
|
View c;
|
|
|
|
@BindView
|
|
ImageView ivLoanUpClosed;
|
|
|
|
@BindView
|
|
LinearLayout linearLoanOutstanding;
|
|
|
|
@BindView
|
|
TextView loanAccountNumber;
|
|
|
|
@BindView
|
|
TextView loanName;
|
|
|
|
@BindView
|
|
ImageView loanTypeImage;
|
|
|
|
@BindView
|
|
TextView outstandingAmount;
|
|
|
|
@BindView
|
|
RelativeLayout relativeLoanLevelUpClosed;
|
|
|
|
@BindView
|
|
RelativeLayout relativeLoanRestricted;
|
|
|
|
@BindView
|
|
ImageView restrictedImageView;
|
|
|
|
@BindView
|
|
TextView tvLoanRestricted;
|
|
|
|
@BindView
|
|
TextView tvLoanUpClosed;
|
|
|
|
@BindView
|
|
TextView tvOutstanding;
|
|
|
|
LoanSummaryDetailViewHolder(View view) {
|
|
super(view);
|
|
this.c = view;
|
|
ButterKnife.c(this, view);
|
|
}
|
|
}
|
|
}
|