what-the-bank/sources/com/scb/phone/view/adapter/investment/funddetails/LtfSummaryAdapter.java

430 lines
18 KiB
Java

package com.scb.phone.view.adapter.investment.funddetails;
import android.content.Context;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
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 com.scb.phone.view.adapter.investment.funddetails.LtfSummaryAdapter;
import java.util.List;
import o.AbstractC5347brN;
import o.C0849Px;
import o.C16148leh;
import o.CfC;
import o.kIT;
import o.pyT;
/* loaded from: classes5.dex */
public final class LtfSummaryAdapter extends BaseExpandableRecycleViewAdapter {
public List<C0849Px> a;
private String c;
private View.OnClickListener d;
private C16148leh e;
@Override // com.scb.phone.view.adapter.BaseExpandableRecycleViewAdapter, o.Qpt
public final boolean b(RecyclerView.zJl zjl) {
return false;
}
/* loaded from: classes5.dex */
public class LtfChildViewHolder_ViewBinding implements Unbinder {
private LtfChildViewHolder e;
public LtfChildViewHolder_ViewBinding(LtfChildViewHolder ltfChildViewHolder, View view) {
this.e = ltfChildViewHolder;
ltfChildViewHolder.llLtfChildItem = (LinearLayout) pyT.e(view, R.id.ll_ltf_child_item, "field 'llLtfChildItem'", LinearLayout.class);
ltfChildViewHolder.tvLtfInvestYear = (TextView) pyT.e(view, R.id.tv_ltf_invest_year, "field 'tvLtfInvestYear'", TextView.class);
ltfChildViewHolder.tvLtfCurrentYear = (TextView) pyT.e(view, R.id.tv_ltf_current_year, "field 'tvLtfCurrentYear'", TextView.class);
ltfChildViewHolder.tvLtfMaturityYear = (TextView) pyT.e(view, R.id.tv_ltf_maturity_year, "field 'tvLtfMaturityYear'", TextView.class);
ltfChildViewHolder.ltfMaturityProgressBar = (ProgressBar) pyT.e(view, R.id.pb_ltf_maturity, "field 'ltfMaturityProgressBar'", ProgressBar.class);
ltfChildViewHolder.tvLtfInvestmentUnits = (TextView) pyT.e(view, R.id.tv_ltf_investment_units, "field 'tvLtfInvestmentUnits'", TextView.class);
ltfChildViewHolder.tvLtfInvestmentValue = (TextView) pyT.e(view, R.id.tv_ltf_investment_value, "field 'tvLtfInvestmentValue'", TextView.class);
ltfChildViewHolder.tvLtfInvestmentGainLoss = (TextView) pyT.e(view, R.id.tv_ltf_investment_gain_loss, "field 'tvLtfInvestmentGainLoss'", TextView.class);
ltfChildViewHolder.tvLtfInvestmentAvailableValue = (TextView) pyT.e(view, R.id.tv_ltf_investment_available_value, "field 'tvLtfInvestmentAvailableValue'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
LtfChildViewHolder ltfChildViewHolder = this.e;
if (ltfChildViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
ltfChildViewHolder.llLtfChildItem = null;
ltfChildViewHolder.tvLtfInvestYear = null;
ltfChildViewHolder.tvLtfCurrentYear = null;
ltfChildViewHolder.tvLtfMaturityYear = null;
ltfChildViewHolder.ltfMaturityProgressBar = null;
ltfChildViewHolder.tvLtfInvestmentUnits = null;
ltfChildViewHolder.tvLtfInvestmentValue = null;
ltfChildViewHolder.tvLtfInvestmentGainLoss = null;
ltfChildViewHolder.tvLtfInvestmentAvailableValue = null;
}
}
/* loaded from: classes5.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.container = (RelativeLayout) pyT.e(view, R.id.ltf_container, "field 'container'", RelativeLayout.class);
parentViewHolder.year = (TextView) pyT.e(view, R.id.ltf_year, "field 'year'", TextView.class);
parentViewHolder.line = pyT.a(view, R.id.ltf_line, "field 'line'");
parentViewHolder.dot = pyT.a(view, R.id.ltf_dot, "field 'dot'");
parentViewHolder.verticalLine = pyT.a(view, R.id.ltf_vertical_line_view, "field 'verticalLine'");
parentViewHolder.expandIconImageView = (ImageView) pyT.e(view, R.id.expand_icon_image_view, "field 'expandIconImageView'", ImageView.class);
}
@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.container = null;
parentViewHolder.year = null;
parentViewHolder.line = null;
parentViewHolder.dot = null;
parentViewHolder.verticalLine = null;
parentViewHolder.expandIconImageView = null;
super.a();
}
}
/* loaded from: classes5.dex */
public class SsfChildViewHolder_ViewBinding implements Unbinder {
private SsfChildViewHolder e;
public SsfChildViewHolder_ViewBinding(SsfChildViewHolder ssfChildViewHolder, View view) {
this.e = ssfChildViewHolder;
ssfChildViewHolder.llSsfChildItem = (LinearLayout) pyT.e(view, R.id.ll_ssf_child_item, "field 'llSsfChildItem'", LinearLayout.class);
ssfChildViewHolder.tvSsfInvestmentYear = (TextView) pyT.e(view, R.id.tv_ssf_investment_year, "field 'tvSsfInvestmentYear'", TextView.class);
ssfChildViewHolder.tvSsfCurrentYear = (TextView) pyT.e(view, R.id.tv_ssf_current_year, "field 'tvSsfCurrentYear'", TextView.class);
ssfChildViewHolder.tvSsfMaturityYear = (TextView) pyT.e(view, R.id.tv_ssf_maturity_year, "field 'tvSsfMaturityYear'", TextView.class);
ssfChildViewHolder.ssfMaturityProgressBar = (ProgressBar) pyT.e(view, R.id.pb_ssf_maturity, "field 'ssfMaturityProgressBar'", ProgressBar.class);
ssfChildViewHolder.tvSsfInvestmentValue = (TextView) pyT.e(view, R.id.tv_ssf_investment_value, "field 'tvSsfInvestmentValue'", TextView.class);
ssfChildViewHolder.tvSsfInvestmentUnit = (TextView) pyT.e(view, R.id.tv_ssf_investment_unit, "field 'tvSsfInvestmentUnit'", TextView.class);
ssfChildViewHolder.tvSsfCurrentValue = (TextView) pyT.e(view, R.id.tv_ssf_current_value, "field 'tvSsfCurrentValue'", TextView.class);
ssfChildViewHolder.tvSsfGainLoss = (TextView) pyT.e(view, R.id.tv_ssf_gain_loss, "field 'tvSsfGainLoss'", TextView.class);
ssfChildViewHolder.tvSsfMaturedCost = (TextView) pyT.e(view, R.id.tv_ssf_matured_cost, "field 'tvSsfMaturedCost'", TextView.class);
ssfChildViewHolder.tvSsfMaturedUnit = (TextView) pyT.e(view, R.id.tv_ssf_matured_unit, "field 'tvSsfMaturedUnit'", TextView.class);
ssfChildViewHolder.tvSsfMaturedAmount = (TextView) pyT.e(view, R.id.tv_ssf_matured_amount, "field 'tvSsfMaturedAmount'", TextView.class);
ssfChildViewHolder.tvSsfMaturedPercent = (TextView) pyT.e(view, R.id.tv_ssf_matured_percent, "field 'tvSsfMaturedPercent'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
SsfChildViewHolder ssfChildViewHolder = this.e;
if (ssfChildViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
ssfChildViewHolder.llSsfChildItem = null;
ssfChildViewHolder.tvSsfInvestmentYear = null;
ssfChildViewHolder.tvSsfCurrentYear = null;
ssfChildViewHolder.tvSsfMaturityYear = null;
ssfChildViewHolder.ssfMaturityProgressBar = null;
ssfChildViewHolder.tvSsfInvestmentValue = null;
ssfChildViewHolder.tvSsfInvestmentUnit = null;
ssfChildViewHolder.tvSsfCurrentValue = null;
ssfChildViewHolder.tvSsfGainLoss = null;
ssfChildViewHolder.tvSsfMaturedCost = null;
ssfChildViewHolder.tvSsfMaturedUnit = null;
ssfChildViewHolder.tvSsfMaturedAmount = null;
ssfChildViewHolder.tvSsfMaturedPercent = null;
}
}
public LtfSummaryAdapter(Context context, List<C0849Px> list, String str, C16148leh c16148leh) {
super(context);
this.a = list;
this.e = c16148leh;
this.d = new View.OnClickListener(this) { // from class: o.evx
private LtfSummaryAdapter c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
LtfSummaryAdapter.c(this.c, view);
}
{
this.c = this;
}
};
this.c = str;
}
@Override // o.Qpt
public final int d() {
return this.a.size();
}
@Override // o.Qpt
public final RecyclerView.zJl anX_(ViewGroup viewGroup, int i) {
return new ParentViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559135, viewGroup, false), this.d);
}
@Override // o.Qpt
public final RecyclerView.zJl anW_(ViewGroup viewGroup, int i) {
LayoutInflater from = LayoutInflater.from(viewGroup.getContext());
if (1 == i) {
View inflate = from.inflate(R.layout.2131559136, viewGroup, false);
inflate.measure(0, 0);
return new SsfChildViewHolder(inflate);
}
View inflate2 = from.inflate(R.layout.2131559134, viewGroup, false);
inflate2.measure(0, 0);
return new LtfChildViewHolder(inflate2);
}
@Override // o.Qpt
public final void d(RecyclerView.zJl zjl, int i) {
if (zjl instanceof ParentViewHolder) {
ParentViewHolder parentViewHolder = (ParentViewHolder) zjl;
C0849Px c0849Px = this.a.get(i);
parentViewHolder.year.setText(c0849Px.a);
parentViewHolder.dot.setBackgroundResource(c0849Px.h);
if (i > 0) {
parentViewHolder.line.setVisibility(0);
} else {
parentViewHolder.line.setVisibility(4);
}
if (i == this.a.size() - 1) {
parentViewHolder.verticalLine.setVisibility(8);
} else {
parentViewHolder.verticalLine.setVisibility(0);
}
BaseExpandableRecycleViewAdapter.a(parentViewHolder);
}
}
@Override // o.Qpt
public final void c(RecyclerView.zJl zjl, int i, int i2) {
C0849Px c0849Px = this.a.get(i);
if (zjl instanceof LtfChildViewHolder) {
LtfChildViewHolder ltfChildViewHolder = (LtfChildViewHolder) zjl;
ltfChildViewHolder.ltfMaturityProgressBar.setMax(c0849Px.l);
ltfChildViewHolder.ltfMaturityProgressBar.setProgress(c0849Px.k);
ltfChildViewHolder.tvLtfInvestYear.setText(c0849Px.a);
ltfChildViewHolder.tvLtfMaturityYear.setText(c0849Px.j);
ltfChildViewHolder.tvLtfInvestmentUnits.setText(c0849Px.f8319o);
ltfChildViewHolder.tvLtfInvestmentValue.setText(c0849Px.m);
ltfChildViewHolder.tvLtfInvestmentAvailableValue.setText(c0849Px.n);
ltfChildViewHolder.tvLtfInvestmentGainLoss.setText(c0849Px.f);
if (c0849Px.l == c0849Px.k || c0849Px.k == 0) {
ltfChildViewHolder.tvLtfCurrentYear.setVisibility(4);
return;
}
if (c0849Px.k >= c0849Px.l) {
ltfChildViewHolder.tvLtfCurrentYear.setVisibility(4);
ltfChildViewHolder.tvLtfMaturityYear.setText(c0849Px.b);
return;
}
ltfChildViewHolder.tvLtfCurrentYear.setVisibility(0);
ltfChildViewHolder.tvLtfCurrentYear.setText(c0849Px.b);
DisplayMetrics displayMetrics = ltfChildViewHolder.tvLtfCurrentYear.getContext().getResources().getDisplayMetrics();
double paddingLeft = ltfChildViewHolder.llLtfChildItem.getPaddingLeft();
double paddingRight = ltfChildViewHolder.llLtfChildItem.getPaddingRight();
ltfChildViewHolder.tvLtfCurrentYear.setTranslationX((int) Math.round((((displayMetrics.widthPixels - paddingLeft) - paddingRight) * (c0849Px.k / c0849Px.l)) - paddingRight));
return;
}
if (zjl instanceof SsfChildViewHolder) {
SsfChildViewHolder ssfChildViewHolder = (SsfChildViewHolder) zjl;
ssfChildViewHolder.ssfMaturityProgressBar.setMax(c0849Px.l);
ssfChildViewHolder.ssfMaturityProgressBar.setProgress(c0849Px.k);
ssfChildViewHolder.tvSsfInvestmentYear.setText(c0849Px.a);
ssfChildViewHolder.tvSsfMaturityYear.setText(c0849Px.j);
ssfChildViewHolder.tvSsfInvestmentValue.setText(c0849Px.m);
ssfChildViewHolder.tvSsfInvestmentUnit.setText(c0849Px.f8319o);
ssfChildViewHolder.tvSsfCurrentValue.setText(c0849Px.n);
ssfChildViewHolder.tvSsfGainLoss.setText(c0849Px.f);
ssfChildViewHolder.tvSsfMaturedCost.setText(c0849Px.d);
ssfChildViewHolder.tvSsfMaturedAmount.setText(c0849Px.c);
ssfChildViewHolder.tvSsfMaturedUnit.setText(c0849Px.g);
ssfChildViewHolder.tvSsfMaturedPercent.setText(c0849Px.i);
if (c0849Px.l == c0849Px.k || c0849Px.k == 0) {
ssfChildViewHolder.tvSsfCurrentYear.setVisibility(4);
return;
}
if (c0849Px.k >= c0849Px.l) {
ssfChildViewHolder.tvSsfCurrentYear.setVisibility(4);
ssfChildViewHolder.tvSsfMaturityYear.setText(c0849Px.b);
return;
}
ssfChildViewHolder.tvSsfCurrentYear.setVisibility(0);
ssfChildViewHolder.tvSsfCurrentYear.setText(c0849Px.b);
DisplayMetrics displayMetrics2 = ssfChildViewHolder.tvSsfCurrentYear.getContext().getResources().getDisplayMetrics();
double paddingLeft2 = ssfChildViewHolder.llSsfChildItem.getPaddingLeft();
double paddingRight2 = ssfChildViewHolder.llSsfChildItem.getPaddingRight();
ssfChildViewHolder.tvSsfCurrentYear.setTranslationX((int) Math.round((((displayMetrics2.widthPixels - paddingLeft2) - paddingRight2) * (c0849Px.k / c0849Px.l)) - paddingRight2));
}
}
/* loaded from: classes5.dex */
static class ParentViewHolder extends BaseExpandableRecycleViewAdapter.BaseParentViewHolder {
@BindView
RelativeLayout container;
@BindView
View dot;
@BindView
ImageView expandIconImageView;
@BindView
View line;
@BindView
View verticalLine;
@BindView
TextView year;
ParentViewHolder(View view, View.OnClickListener onClickListener) {
super(view);
ButterKnife.c(this, view);
this.container.setOnClickListener(onClickListener);
}
}
@Override // o.pvT, o.Qpt
public final int b() {
return "S".equals(this.c) ? 1 : 0;
}
/* loaded from: classes5.dex */
static class LtfChildViewHolder extends AbstractC5347brN {
@BindView
LinearLayout llLtfChildItem;
@BindView
ProgressBar ltfMaturityProgressBar;
@BindView
TextView tvLtfCurrentYear;
@BindView
TextView tvLtfInvestYear;
@BindView
TextView tvLtfInvestmentAvailableValue;
@BindView
TextView tvLtfInvestmentGainLoss;
@BindView
TextView tvLtfInvestmentUnits;
@BindView
TextView tvLtfInvestmentValue;
@BindView
TextView tvLtfMaturityYear;
LtfChildViewHolder(View view) {
super(view);
ButterKnife.c(this, view);
}
}
/* loaded from: classes5.dex */
static class SsfChildViewHolder extends AbstractC5347brN {
@BindView
LinearLayout llSsfChildItem;
@BindView
ProgressBar ssfMaturityProgressBar;
@BindView
TextView tvSsfCurrentValue;
@BindView
TextView tvSsfCurrentYear;
@BindView
TextView tvSsfGainLoss;
@BindView
TextView tvSsfInvestmentUnit;
@BindView
TextView tvSsfInvestmentValue;
@BindView
TextView tvSsfInvestmentYear;
@BindView
TextView tvSsfMaturedAmount;
@BindView
TextView tvSsfMaturedCost;
@BindView
TextView tvSsfMaturedPercent;
@BindView
TextView tvSsfMaturedUnit;
@BindView
TextView tvSsfMaturityYear;
SsfChildViewHolder(View view) {
super(view);
ButterKnife.c(this, view);
}
}
public static /* synthetic */ void c(LtfSummaryAdapter ltfSummaryAdapter, View view) {
int adapterPosition;
kIT kit;
RecyclerView.zJl a = CfC.a(view);
if (a == null || (adapterPosition = a.getAdapterPosition()) == -1) {
return;
}
kIT kit2 = ltfSummaryAdapter.e.j;
int c = (int) (kit2 == null ? -1L : kit2.g.c(adapterPosition));
if (!ltfSummaryAdapter.e.j.g.b()) {
for (int i = 0; i < ltfSummaryAdapter.a.size(); i++) {
if (i != c && ltfSummaryAdapter.e.d(i) && (kit = ltfSummaryAdapter.e.j) != null) {
kit.e(i, false);
}
}
if (ltfSummaryAdapter.e.d(c)) {
kIT kit3 = ltfSummaryAdapter.e.j;
if (kit3 != null) {
kit3.e(c, false);
return;
}
return;
}
kIT kit4 = ltfSummaryAdapter.e.j;
if (kit4 != null) {
kit4.a(c, false);
return;
}
return;
}
kIT kit5 = ltfSummaryAdapter.e.j;
if (kit5 != null) {
kit5.a(c, false);
}
}
}