what-the-bank/sources/com/scb/phone/view/activity/partner/PartnerLandingAdapter.java

623 lines
24 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.activity.partner;
import android.content.res.Resources;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.Unbinder;
import com.rd.PageIndicatorView;
import com.scb.phone.R;
import com.scb.phone.view.activity.partner.PartnerLandingAdapter;
import com.scb.phone.view.adapter.BaseHighlightAdapter;
import com.scb.phone.view.custom.InfiniteRecyclerView;
import java.util.ArrayList;
import java.util.List;
import o.C1020Tx;
import o.C1021Ty;
import o.C1023Tz;
import o.C10456eEq;
import o.C14851gaI;
import o.C14957gcv;
import o.C6583cXR;
import o.TA;
import o.TB;
import o.TF;
import o.TH;
import o.fJF;
import o.pyT;
/* loaded from: classes5.dex */
public final class PartnerLandingAdapter extends RecyclerView.Sts<HBt> {
private IeS b;
public List<? extends TF> c;
/* loaded from: classes5.dex */
public final class PartnerGroupTitleHolder_ViewBinding implements Unbinder {
private PartnerGroupTitleHolder e;
public PartnerGroupTitleHolder_ViewBinding(PartnerGroupTitleHolder partnerGroupTitleHolder, View view) {
this.e = partnerGroupTitleHolder;
partnerGroupTitleHolder.tvGroupTitle = (TextView) pyT.e(view, R.id.tv_title, "field 'tvGroupTitle'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
PartnerGroupTitleHolder partnerGroupTitleHolder = this.e;
if (partnerGroupTitleHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
partnerGroupTitleHolder.tvGroupTitle = null;
}
}
/* loaded from: classes5.dex */
public final class PartnerHorizontalGroup_ViewBinding implements Unbinder {
private PartnerHorizontalGroup c;
public PartnerHorizontalGroup_ViewBinding(PartnerHorizontalGroup partnerHorizontalGroup, View view) {
this.c = partnerHorizontalGroup;
partnerHorizontalGroup.rvPartnerHorizontal = (RecyclerView) pyT.e(view, R.id.rv_partner_horizontal, "field 'rvPartnerHorizontal'", RecyclerView.class);
}
@Override // butterknife.Unbinder
public final void a() {
PartnerHorizontalGroup partnerHorizontalGroup = this.c;
if (partnerHorizontalGroup == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
partnerHorizontalGroup.rvPartnerHorizontal = null;
}
}
/* loaded from: classes5.dex */
public final class PartnerHighlightHolder_ViewBinding implements Unbinder {
private PartnerHighlightHolder c;
public PartnerHighlightHolder_ViewBinding(PartnerHighlightHolder partnerHighlightHolder, View view) {
this.c = partnerHighlightHolder;
partnerHighlightHolder.rvHighlightBanner = (InfiniteRecyclerView) pyT.e(view, R.id.rv_highlight_banner, "field 'rvHighlightBanner'", InfiniteRecyclerView.class);
partnerHighlightHolder.pivHighlightBanner = (PageIndicatorView) pyT.e(view, R.id.piv_highlight_banner, "field 'pivHighlightBanner'", PageIndicatorView.class);
}
@Override // butterknife.Unbinder
public final void a() {
PartnerHighlightHolder partnerHighlightHolder = this.c;
if (partnerHighlightHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
partnerHighlightHolder.rvHighlightBanner = null;
partnerHighlightHolder.pivHighlightBanner = null;
}
}
/* loaded from: classes5.dex */
public final class PartnerTileHolder_ViewBinding implements Unbinder {
private PartnerTileHolder e;
public PartnerTileHolder_ViewBinding(PartnerTileHolder partnerTileHolder, View view) {
this.e = partnerTileHolder;
partnerTileHolder.fmLayoutNewContainer = (FrameLayout) pyT.e(view, R.id.fl_new_container, "field 'fmLayoutNewContainer'", FrameLayout.class);
partnerTileHolder.ivPartner = (ImageView) pyT.e(view, R.id.iv_partner, "field 'ivPartner'", ImageView.class);
partnerTileHolder.tvPartnerName = (TextView) pyT.e(view, R.id.tv_partner_name, "field 'tvPartnerName'", TextView.class);
partnerTileHolder.tvPartnerDesc = (TextView) pyT.e(view, R.id.tv_partner_desc, "field 'tvPartnerDesc'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
PartnerTileHolder partnerTileHolder = this.e;
if (partnerTileHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
partnerTileHolder.fmLayoutNewContainer = null;
partnerTileHolder.ivPartner = null;
partnerTileHolder.tvPartnerName = null;
partnerTileHolder.tvPartnerDesc = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(HBt hBt, int i) {
HBt hBt2 = hBt;
C14957gcv.e(hBt2, "");
hBt2.a(this.c.get(i));
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ HBt onCreateViewHolder(ViewGroup viewGroup, int i) {
HBt partnerTileHolder;
C14957gcv.e(viewGroup, "");
if (i == 1) {
partnerTileHolder = new PartnerTileHolder(viewGroup, R.layout.2131560029, this.b);
} else if (i == 2) {
partnerTileHolder = new PartnerTileHolder(viewGroup, R.layout.2131560028, this.b);
} else if (i == 3) {
partnerTileHolder = new PartnerHighlightHolder(viewGroup, this.b);
} else if (i == 4) {
partnerTileHolder = new PartnerHorizontalGroup(viewGroup, this.b);
} else {
partnerTileHolder = new PartnerGroupTitleHolder(viewGroup, this.b);
}
return partnerTileHolder;
}
public PartnerLandingAdapter(IeS ieS) {
C14957gcv.e(ieS, "");
this.b = ieS;
this.c = C14851gaI.c;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemViewType(int i) {
TF tf = this.c.get(i);
boolean z = tf instanceof TB;
if (z && ((TB) tf).c == TH.NTB) {
return 1;
}
if (z && ((TB) tf).c == TH.ETB) {
return 2;
}
if (tf instanceof C1020Tx) {
return 3;
}
return tf instanceof C1021Ty ? 4 : 0;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.c.size();
}
/* loaded from: classes5.dex */
public static class HBt extends RecyclerView.zJl {
public TF c;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public HBt(View view) {
super(view);
C14957gcv.e(view, "");
}
public void a(TF tf) {
C14957gcv.e(tf, "");
C14957gcv.e(tf, "");
this.c = tf;
}
}
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
/* loaded from: classes5.dex */
public static final class PartnerGroupTitleHolder extends HBt {
@BindView
public TextView tvGroupTitle;
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public PartnerGroupTitleHolder(android.view.ViewGroup r5, final com.scb.phone.view.activity.partner.PartnerLandingAdapter.IeS r6) {
/*
r4 = this;
java.lang.String r0 = ""
o.C14957gcv.e(r5, r0)
o.C14957gcv.e(r6, r0)
android.content.Context r1 = r5.getContext()
android.view.LayoutInflater r1 = android.view.LayoutInflater.from(r1)
r2 = 2131560025(0x7f0d0659, float:1.874541E38)
r3 = 0
android.view.View r5 = r1.inflate(r2, r5, r3)
o.C14957gcv.c(r5, r0)
r4.<init>(r5)
android.view.View r5 = r4.itemView
butterknife.ButterKnife.c(r4, r5)
android.view.View r5 = r4.itemView
o.efb r0 = new o.efb
r0.<init>(r6, r4)
r5.setOnClickListener(r0)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.activity.partner.PartnerLandingAdapter.PartnerGroupTitleHolder.<init>(android.view.ViewGroup, com.scb.phone.view.activity.partner.PartnerLandingAdapter$IeS):void");
}
@Override // com.scb.phone.view.activity.partner.PartnerLandingAdapter.HBt
public final void a(TF tf) {
C14957gcv.e(tf, "");
super.a(tf);
TA ta = (TA) tf;
TextView textView = this.tvGroupTitle;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(ta.e);
}
public static /* synthetic */ void a(IeS ieS, PartnerGroupTitleHolder partnerGroupTitleHolder) {
C14957gcv.e(ieS, "");
C14957gcv.e(partnerGroupTitleHolder, "");
TF tf = partnerGroupTitleHolder.c;
if (tf == null) {
C14957gcv.a("");
tf = null;
}
ieS.d(tf);
}
}
/* loaded from: classes5.dex */
public static final class PartnerTileHolder extends HBt {
@BindView
public FrameLayout fmLayoutNewContainer;
@BindView
public ImageView ivPartner;
@BindView
public TextView tvPartnerDesc;
@BindView
public TextView tvPartnerName;
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public PartnerTileHolder(android.view.ViewGroup r4, int r5, final com.scb.phone.view.activity.partner.PartnerLandingAdapter.IeS r6) {
/*
r3 = this;
java.lang.String r0 = ""
o.C14957gcv.e(r4, r0)
o.C14957gcv.e(r6, r0)
android.content.Context r1 = r4.getContext()
android.view.LayoutInflater r1 = android.view.LayoutInflater.from(r1)
r2 = 0
android.view.View r4 = r1.inflate(r5, r4, r2)
o.C14957gcv.c(r4, r0)
r3.<init>(r4)
android.view.View r4 = r3.itemView
butterknife.ButterKnife.c(r3, r4)
android.view.View r4 = r3.itemView
o.efa r5 = new o.efa
r5.<init>(r6, r3)
r4.setOnClickListener(r5)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.activity.partner.PartnerLandingAdapter.PartnerTileHolder.<init>(android.view.ViewGroup, int, com.scb.phone.view.activity.partner.PartnerLandingAdapter$IeS):void");
}
@Override // com.scb.phone.view.activity.partner.PartnerLandingAdapter.HBt
public final void a(TF tf) {
C14957gcv.e(tf, "");
super.a(tf);
TB tb = (TB) tf;
final TextView textView = this.tvPartnerName;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(tb.d);
if (tb.c == TH.ETB) {
textView.post(new Runnable(this, textView) { // from class: o.efc
private TextView a;
private PartnerLandingAdapter.PartnerTileHolder b;
@Override // java.lang.Runnable
public final void run() {
PartnerLandingAdapter.PartnerTileHolder.aka_(this.b, this.a);
}
{
this.b = this;
this.a = textView;
}
});
}
TextView textView2 = this.tvPartnerDesc;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(tb.b);
FrameLayout frameLayout = this.fmLayoutNewContainer;
if (frameLayout == null) {
C14957gcv.a("");
frameLayout = null;
}
frameLayout.setVisibility(tb.e ? 0 : 8);
String str = tb.a;
if (str != null) {
ImageView imageView = this.ivPartner;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
C10456eEq.aqe_(imageView, str, null);
}
}
/* loaded from: classes5.dex */
public static final class HBt {
private HBt() {
}
public /* synthetic */ HBt(byte b) {
this();
}
}
public static /* synthetic */ void e(IeS ieS, PartnerTileHolder partnerTileHolder) {
C14957gcv.e(ieS, "");
C14957gcv.e(partnerTileHolder, "");
TF tf = partnerTileHolder.c;
if (tf == null) {
C14957gcv.a("");
tf = null;
}
ieS.d(tf);
}
public static /* synthetic */ void aka_(PartnerTileHolder partnerTileHolder, TextView textView) {
C14957gcv.e(partnerTileHolder, "");
C14957gcv.e(textView, "");
TextView textView2 = partnerTileHolder.tvPartnerDesc;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setMaxLines(textView.getLineCount() <= 1 ? 2 : 1);
}
static {
new HBt((byte) 0);
}
}
/* loaded from: classes5.dex */
public static final class PartnerHorizontalGroup extends HBt {
private PartnerLandingAdapter d;
@BindView
public RecyclerView rvPartnerHorizontal;
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public PartnerHorizontalGroup(android.view.ViewGroup r5, com.scb.phone.view.activity.partner.PartnerLandingAdapter.IeS r6) {
/*
r4 = this;
java.lang.String r0 = ""
o.C14957gcv.e(r5, r0)
o.C14957gcv.e(r6, r0)
android.content.Context r1 = r5.getContext()
android.view.LayoutInflater r1 = android.view.LayoutInflater.from(r1)
r2 = 2131560027(0x7f0d065b, float:1.8745415E38)
r3 = 0
android.view.View r5 = r1.inflate(r2, r5, r3)
o.C14957gcv.c(r5, r0)
r4.<init>(r5)
android.view.View r5 = r4.itemView
butterknife.ButterKnife.c(r4, r5)
androidx.recyclerview.widget.RecyclerView r5 = r4.rvPartnerHorizontal
r1 = 0
if (r5 == 0) goto L29
goto L2d
L29:
o.C14957gcv.a(r0)
r5 = r1
L2d:
android.view.View r2 = r4.itemView
r2.getContext()
androidx.recyclerview.widget.LinearLayoutManager r2 = new androidx.recyclerview.widget.LinearLayoutManager
r2.<init>(r3, r3)
androidx.recyclerview.widget.RecyclerView$tOB r2 = (androidx.recyclerview.widget.RecyclerView.tOB) r2
r5.setLayoutManager(r2)
com.scb.phone.view.activity.partner.PartnerLandingAdapter r5 = new com.scb.phone.view.activity.partner.PartnerLandingAdapter
r5.<init>(r6)
r4.d = r5
androidx.recyclerview.widget.RecyclerView r5 = r4.rvPartnerHorizontal
if (r5 == 0) goto L48
goto L4c
L48:
o.C14957gcv.a(r0)
r5 = r1
L4c:
com.scb.phone.view.activity.partner.PartnerLandingAdapter r6 = r4.d
androidx.recyclerview.widget.RecyclerView$Sts r6 = (androidx.recyclerview.widget.RecyclerView.Sts) r6
r5.setAdapter(r6)
o.SxS r5 = new o.SxS
r5.<init>()
androidx.recyclerview.widget.RecyclerView r6 = r4.rvPartnerHorizontal
if (r6 == 0) goto L5e
r1 = r6
goto L61
L5e:
o.C14957gcv.a(r0)
L61:
r5.a(r1)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.activity.partner.PartnerLandingAdapter.PartnerHorizontalGroup.<init>(android.view.ViewGroup, com.scb.phone.view.activity.partner.PartnerLandingAdapter$IeS):void");
}
@Override // com.scb.phone.view.activity.partner.PartnerLandingAdapter.HBt
public final void a(TF tf) {
C14957gcv.e(tf, "");
super.a(tf);
if (tf instanceof C1021Ty) {
PartnerLandingAdapter partnerLandingAdapter = this.d;
List<TF> list = ((C1021Ty) tf).d;
C14957gcv.e(list, "");
partnerLandingAdapter.c = list;
partnerLandingAdapter.notifyDataSetChanged();
}
}
}
/* loaded from: classes5.dex */
public static final class PartnerHighlightHolder extends HBt implements BaseHighlightAdapter.LWm<C1023Tz>, fJF.HBt {
private final IeS a;
private BaseHighlightAdapter<C1023Tz, ArrayList<C1023Tz>> d;
@BindView
public PageIndicatorView pivHighlightBanner;
@BindView
public InfiniteRecyclerView rvHighlightBanner;
@Override // com.scb.phone.view.adapter.BaseHighlightAdapter.LWm
public final /* synthetic */ void d(C1023Tz c1023Tz) {
C1023Tz c1023Tz2 = c1023Tz;
C14957gcv.e(c1023Tz2, "");
this.a.e(c1023Tz2);
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public PartnerHighlightHolder(android.view.ViewGroup r5, com.scb.phone.view.activity.partner.PartnerLandingAdapter.IeS r6) {
/*
r4 = this;
java.lang.String r0 = ""
o.C14957gcv.e(r5, r0)
o.C14957gcv.e(r6, r0)
android.content.Context r1 = r5.getContext()
android.view.LayoutInflater r1 = android.view.LayoutInflater.from(r1)
r2 = 2131560026(0x7f0d065a, float:1.8745413E38)
r3 = 0
android.view.View r5 = r1.inflate(r2, r5, r3)
o.C14957gcv.c(r5, r0)
r4.<init>(r5)
r4.a = r6
android.view.View r5 = r4.itemView
butterknife.ButterKnife.c(r4, r5)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.activity.partner.PartnerLandingAdapter.PartnerHighlightHolder.<init>(android.view.ViewGroup, com.scb.phone.view.activity.partner.PartnerLandingAdapter$IeS):void");
}
@Override // com.scb.phone.view.activity.partner.PartnerLandingAdapter.HBt
public final void a(TF tf) {
int dimensionPixelOffset;
C14957gcv.e(tf, "");
super.a(tf);
List<C1023Tz> list = ((C1020Tx) tf).d;
this.d = new BaseHighlightAdapter<>(new ArrayList(list), this);
InfiniteRecyclerView infiniteRecyclerView = this.rvHighlightBanner;
PageIndicatorView pageIndicatorView = null;
if (infiniteRecyclerView == null) {
C14957gcv.a("");
infiniteRecyclerView = null;
}
this.itemView.getContext();
infiniteRecyclerView.setLayoutManager(new LinearLayoutManager(0, false));
BaseHighlightAdapter<C1023Tz, ArrayList<C1023Tz>> baseHighlightAdapter = this.d;
if (baseHighlightAdapter == null) {
C14957gcv.a("");
baseHighlightAdapter = null;
}
infiniteRecyclerView.setAdapter(baseHighlightAdapter);
InfiniteRecyclerView.setOnSnapPositionChangeListener$default(infiniteRecyclerView, null, this, 1, null);
this.itemView.getResources();
infiniteRecyclerView.g();
boolean z = list.size() == 1;
if (z) {
dimensionPixelOffset = a(true);
} else {
Resources resources = this.itemView.getResources();
C14957gcv.c(resources, "");
dimensionPixelOffset = resources.getDimensionPixelOffset(R.dimen.f17442131165510);
}
int a = a(z);
InfiniteRecyclerView infiniteRecyclerView2 = this.rvHighlightBanner;
if (infiniteRecyclerView2 == null) {
C14957gcv.a("");
infiniteRecyclerView2 = null;
}
infiniteRecyclerView2.setPadding(dimensionPixelOffset, 0, a, 0);
int size = list.size();
PageIndicatorView pageIndicatorView2 = this.pivHighlightBanner;
if (pageIndicatorView2 == null) {
C14957gcv.a("");
pageIndicatorView2 = null;
}
pageIndicatorView2.setCount(size);
PageIndicatorView pageIndicatorView3 = this.pivHighlightBanner;
if (pageIndicatorView3 == null) {
C14957gcv.a("");
pageIndicatorView3 = null;
}
pageIndicatorView3.setAnimationDuration(0L);
PageIndicatorView pageIndicatorView4 = this.pivHighlightBanner;
if (pageIndicatorView4 != null) {
pageIndicatorView = pageIndicatorView4;
} else {
C14957gcv.a("");
}
pageIndicatorView.setVisibility(0);
}
@Override // o.fJF.HBt
public final void d(int i) {
PageIndicatorView pageIndicatorView = this.pivHighlightBanner;
BaseHighlightAdapter<C1023Tz, ArrayList<C1023Tz>> baseHighlightAdapter = null;
if (pageIndicatorView == null) {
C14957gcv.a("");
pageIndicatorView = null;
}
BaseHighlightAdapter<C1023Tz, ArrayList<C1023Tz>> baseHighlightAdapter2 = this.d;
if (baseHighlightAdapter2 == null) {
C14957gcv.a("");
} else {
baseHighlightAdapter = baseHighlightAdapter2;
}
pageIndicatorView.setSelection(baseHighlightAdapter.b(i));
}
private final int a(boolean z) {
int i = C6583cXR.Wc_(this.itemView.getContext()).widthPixels;
Resources resources = this.itemView.getResources();
C14957gcv.c(resources, "");
int dimensionPixelOffset = resources.getDimensionPixelOffset(R.dimen.f18262131165592);
return z ? (i - dimensionPixelOffset) / 2 : i - dimensionPixelOffset;
}
}
/* loaded from: classes5.dex */
public interface IeS {
void d(TF tf);
default void e(C1023Tz c1023Tz) {
C14957gcv.e(c1023Tz, "");
}
}
static {
new Sts((byte) 0);
}
}