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

235 lines
8.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.investment.funddetails;
import android.content.Context;
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 com.scb.phone.view.adapter.investment.funddetails.DividendSummaryAdapter;
import java.util.List;
import o.AbstractC5347brN;
import o.C0851Pz;
import o.C16148leh;
import o.CfC;
import o.kIT;
import o.pyT;
/* loaded from: classes5.dex */
public final class DividendSummaryAdapter extends BaseExpandableRecycleViewAdapter {
private C16148leh a;
public List<C0851Pz> c;
private View.OnClickListener d;
@Override // com.scb.phone.view.adapter.BaseExpandableRecycleViewAdapter, o.Qpt
public final boolean b(RecyclerView.zJl zjl) {
return false;
}
/* loaded from: classes5.dex */
public class ChildViewHolder_ViewBinding implements Unbinder {
private ChildViewHolder b;
public ChildViewHolder_ViewBinding(ChildViewHolder childViewHolder, View view) {
this.b = childViewHolder;
childViewHolder.paymentDate = (TextView) pyT.e(view, R.id.dividend_child_payment_date_value, "field 'paymentDate'", TextView.class);
childViewHolder.tax = (TextView) pyT.e(view, R.id.dividend_child_tax_value, "field 'tax'", TextView.class);
childViewHolder.afterTax = (TextView) pyT.e(view, R.id.dividend_child_after_tax_value, "field 'afterTax'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ChildViewHolder childViewHolder = this.b;
if (childViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.b = null;
childViewHolder.paymentDate = null;
childViewHolder.tax = null;
childViewHolder.afterTax = null;
}
}
/* loaded from: classes5.dex */
public class ParentViewHolder_ViewBinding extends BaseExpandableRecycleViewAdapter.BaseParentViewHolder_ViewBinding {
private ParentViewHolder d;
public ParentViewHolder_ViewBinding(ParentViewHolder parentViewHolder, View view) {
super(parentViewHolder, view);
this.d = parentViewHolder;
parentViewHolder.container = (RelativeLayout) pyT.e(view, R.id.dividend_container, "field 'container'", RelativeLayout.class);
parentViewHolder.exDate = (TextView) pyT.e(view, R.id.dividend_execute_date, "field 'exDate'", TextView.class);
parentViewHolder.line = pyT.a(view, R.id.dividend_line, "field 'line'");
parentViewHolder.verticalLine = pyT.a(view, R.id.dividend_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.d;
if (parentViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
parentViewHolder.container = null;
parentViewHolder.exDate = null;
parentViewHolder.line = null;
parentViewHolder.verticalLine = null;
parentViewHolder.expandIconImageView = null;
super.a();
}
}
public DividendSummaryAdapter(Context context, List<C0851Pz> list, C16148leh c16148leh) {
super(context);
this.b = context;
this.c = list;
this.a = c16148leh;
this.d = new View.OnClickListener(this) { // from class: o.evr
private DividendSummaryAdapter c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
DividendSummaryAdapter.c(this.c, view);
}
{
this.c = this;
}
};
}
@Override // o.Qpt
public final int d() {
return this.c.size();
}
@Override // o.Qpt
public final RecyclerView.zJl anX_(ViewGroup viewGroup, int i) {
return new ParentViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559133, viewGroup, false), this.d);
}
@Override // o.Qpt
public final RecyclerView.zJl anW_(ViewGroup viewGroup, int i) {
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559132, viewGroup, false);
inflate.measure(0, 0);
return new ChildViewHolder(inflate);
}
@Override // o.Qpt
public final void d(RecyclerView.zJl zjl, int i) {
if (zjl instanceof ParentViewHolder) {
ParentViewHolder parentViewHolder = (ParentViewHolder) zjl;
parentViewHolder.exDate.setText(this.c.get(i).a);
if (i > 0) {
parentViewHolder.line.setVisibility(0);
} else {
parentViewHolder.line.setVisibility(4);
}
if (i == this.c.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) {
if (zjl instanceof ChildViewHolder) {
ChildViewHolder childViewHolder = (ChildViewHolder) zjl;
C0851Pz c0851Pz = this.c.get(i);
childViewHolder.paymentDate.setText(c0851Pz.d);
childViewHolder.tax.setText(c0851Pz.i);
childViewHolder.afterTax.setText(c0851Pz.b);
}
}
/* loaded from: classes5.dex */
static class ParentViewHolder extends BaseExpandableRecycleViewAdapter.BaseParentViewHolder {
@BindView
RelativeLayout container;
@BindView
TextView exDate;
@BindView
ImageView expandIconImageView;
@BindView
View line;
@BindView
View verticalLine;
ParentViewHolder(View view, View.OnClickListener onClickListener) {
super(view);
ButterKnife.c(this, view);
this.container.setOnClickListener(onClickListener);
}
}
/* loaded from: classes5.dex */
static class ChildViewHolder extends AbstractC5347brN {
@BindView
TextView afterTax;
@BindView
TextView paymentDate;
@BindView
TextView tax;
ChildViewHolder(View view) {
super(view);
ButterKnife.c(this, view);
}
}
public static /* synthetic */ void c(DividendSummaryAdapter dividendSummaryAdapter, View view) {
int adapterPosition;
kIT kit;
RecyclerView.zJl a = CfC.a(view);
if (a == null || (adapterPosition = a.getAdapterPosition()) == -1) {
return;
}
kIT kit2 = dividendSummaryAdapter.a.j;
int c = (int) (kit2 == null ? -1L : kit2.g.c(adapterPosition));
if (!dividendSummaryAdapter.a.j.g.b()) {
for (int i = 0; i < dividendSummaryAdapter.c.size(); i++) {
if (i != c && dividendSummaryAdapter.a.d(i) && (kit = dividendSummaryAdapter.a.j) != null) {
kit.e(i, false);
}
}
if (dividendSummaryAdapter.a.d(c)) {
kIT kit3 = dividendSummaryAdapter.a.j;
if (kit3 != null) {
kit3.e(c, false);
return;
}
return;
}
kIT kit4 = dividendSummaryAdapter.a.j;
if (kit4 != null) {
kit4.a(c, false);
return;
}
return;
}
kIT kit5 = dividendSummaryAdapter.a.j;
if (kit5 != null) {
kit5.a(c, false);
}
}
}