what-the-bank/sources/o/C11549ehT.java

145 lines
5.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.ButterKnife;
import com.scb.phone.view.activity.prepaid.DetailsTabHolder;
import com.scb.phone.view.activity.prepaid.PointTabHolder;
import com.scb.phone.view.adapter.prepaid.PrepaidTransactionAdapter;
import java.util.List;
import o.C16148leh;
/* renamed from: o.ehT, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C11549ehT extends WYJ {
public List<C1062Uu> a;
public C1049Un b;
public DetailsTabHolder c;
public final C1054Up d;
public PointTabHolder e;
private final DetailsTabHolder.RVV g;
private final LWm h;
private final Context j;
/* renamed from: o.ehT$LWm */
/* loaded from: classes5.dex */
public interface LWm {
void g();
}
@Override // o.WYJ
public final int getCount() {
return 2;
}
@Override // o.WYJ
public final boolean isViewFromObject(View view, Object obj) {
return view == obj;
}
public C11549ehT(C1054Up c1054Up, Context context, DetailsTabHolder.RVV rvv, LWm lWm) {
this.d = c1054Up;
this.j = context;
this.g = rvv;
this.h = lWm;
}
@Override // o.WYJ
public final CharSequence getPageTitle(int i) {
if (i == 0) {
return this.j.getString(com.scb.phone.R.string.prepaid_tab_details);
}
if (i == 1) {
return this.j.getString(com.scb.phone.R.string.prepaid_tab_points);
}
return super.getPageTitle(i);
}
@Override // o.WYJ
public final Object instantiateItem(ViewGroup viewGroup, int i) {
View view;
LayoutInflater from = LayoutInflater.from(viewGroup.getContext());
if (i == 0) {
final DetailsTabHolder detailsTabHolder = new DetailsTabHolder(this.g);
this.c = detailsTabHolder;
detailsTabHolder.c = viewGroup.getContext();
view = from.inflate(com.scb.phone.R.layout.2131560113, viewGroup, false);
ButterKnife.c(detailsTabHolder, view);
Drawable mutate = nMh.getDrawable(detailsTabHolder.c, com.scb.phone.R.drawable.ic_filter_list_black_24dp).mutate();
Tlu.pE_(mutate, nMh.getColor(detailsTabHolder.c, com.scb.phone.R.color.f13682131100876));
detailsTabHolder.mToolbarTxnPrepaid.setOverflowIcon(mutate);
detailsTabHolder.mTextTxnPrepaid.setText(com.scb.phone.R.string.prepaid_details_transactions);
Context context = detailsTabHolder.c;
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(1, false);
C16148leh c16148leh = new C16148leh(null);
detailsTabHolder.d = c16148leh;
C16148leh.IeS ieS = new C16148leh.IeS() { // from class: o.ehD
@Override // o.C16148leh.IeS
public final void e(int i2) {
DetailsTabHolder.c();
}
};
kIT kit = c16148leh.j;
if (kit == null) {
c16148leh.a = ieS;
} else {
kit.b = ieS;
}
C16148leh c16148leh2 = detailsTabHolder.d;
C16148leh.HBt hBt = new C16148leh.HBt(detailsTabHolder) { // from class: o.ehE
private DetailsTabHolder d;
@Override // o.C16148leh.HBt
public final void d(int i2) {
DetailsTabHolder.e(this.d, i2);
}
{
this.d = detailsTabHolder;
}
};
kIT kit2 = c16148leh2.j;
if (kit2 == null) {
c16148leh2.b = hBt;
} else {
kit2.e = hBt;
}
PrepaidTransactionAdapter prepaidTransactionAdapter = new PrepaidTransactionAdapter(detailsTabHolder.c);
detailsTabHolder.b = prepaidTransactionAdapter;
RecyclerView.Sts d = detailsTabHolder.d.d(prepaidTransactionAdapter);
C8912dZm c8912dZm = new C8912dZm();
c8912dZm.setSupportsChangeAnimations(false);
detailsTabHolder.mRecyclerViewPrepaid.setLayoutManager(linearLayoutManager);
detailsTabHolder.mRecyclerViewPrepaid.setAdapter(d);
detailsTabHolder.mRecyclerViewPrepaid.setItemAnimator(c8912dZm);
detailsTabHolder.mRecyclerViewPrepaid.setHasFixedSize(false);
detailsTabHolder.mRecyclerViewPrepaid.setNestedScrollingEnabled(false);
detailsTabHolder.d.b(detailsTabHolder.mRecyclerViewPrepaid);
this.c.e(this.a);
this.h.g();
} else {
PointTabHolder pointTabHolder = new PointTabHolder(viewGroup);
this.e = pointTabHolder;
view = pointTabHolder.c;
}
viewGroup.addView(view);
return view;
}
@Override // o.WYJ
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
View view = (View) obj;
if (view == this.e.c) {
this.e = null;
} else {
this.c = null;
}
viewGroup.removeView(view);
}
}