172 lines
6.2 KiB
Java
172 lines
6.2 KiB
Java
|
package com.scb.phone.view.adapter.landingpage;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.graphics.drawable.Drawable;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.widget.ImageView;
|
||
|
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.landingpage.ShortcutAdapter;
|
||
|
import com.scb.phone.view.custom.RectangleRelativeLayout;
|
||
|
import o.AyW;
|
||
|
import o.C0907Rf;
|
||
|
import o.C12891fKc;
|
||
|
import o.EnumC14464fth;
|
||
|
import o.InterfaceC12819fII;
|
||
|
import o.Mmw;
|
||
|
import o.nMh;
|
||
|
import o.pyT;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class ShortcutAdapter extends RecyclerView.Sts<MyViewHolder> {
|
||
|
private Drawable b;
|
||
|
private final InterfaceC12819fII c;
|
||
|
private final Context d;
|
||
|
private C0907Rf e;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class MyViewHolder_ViewBinding implements Unbinder {
|
||
|
private MyViewHolder e;
|
||
|
|
||
|
public MyViewHolder_ViewBinding(MyViewHolder myViewHolder, View view) {
|
||
|
this.e = myViewHolder;
|
||
|
myViewHolder.backgroundImageView = (ImageView) pyT.a(view, R.id.landing_tile_background, "field 'backgroundImageView'", ImageView.class);
|
||
|
myViewHolder.descTextView = (TextView) pyT.a(view, R.id.landing_tile_text, "field 'descTextView'", TextView.class);
|
||
|
myViewHolder.iconImageView = (ImageView) pyT.a(view, R.id.landing_tile_icon, "field 'iconImageView'", ImageView.class);
|
||
|
myViewHolder.rectangleRelativeLayout = (RectangleRelativeLayout) pyT.a(view, R.id.rectangle_relative_layout, "field 'rectangleRelativeLayout'", RectangleRelativeLayout.class);
|
||
|
}
|
||
|
|
||
|
@Override // butterknife.Unbinder
|
||
|
public final void a() {
|
||
|
MyViewHolder myViewHolder = this.e;
|
||
|
if (myViewHolder == null) {
|
||
|
throw new IllegalStateException("Bindings already cleared.");
|
||
|
}
|
||
|
this.e = null;
|
||
|
myViewHolder.backgroundImageView = null;
|
||
|
myViewHolder.descTextView = null;
|
||
|
myViewHolder.iconImageView = null;
|
||
|
myViewHolder.rectangleRelativeLayout = null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final /* synthetic */ void onBindViewHolder(MyViewHolder myViewHolder, int i) {
|
||
|
MyViewHolder myViewHolder2 = myViewHolder;
|
||
|
myViewHolder2.a = i;
|
||
|
C0907Rf.Sts a = this.e.a(i);
|
||
|
if (myViewHolder2.iconImageView != null) {
|
||
|
C12891fKc.azg_(this.d, this.b, myViewHolder2.iconImageView, a.w, this.d.getResources().getDimensionPixelOffset(R.dimen.f15242131165288), nMh.getColor(this.d, R.color.f3412131099849));
|
||
|
}
|
||
|
if (myViewHolder2.descTextView != null && a.K != null && !a.K.isEmpty()) {
|
||
|
myViewHolder2.descTextView.setText(a.K);
|
||
|
}
|
||
|
if (myViewHolder2.rectangleRelativeLayout != null) {
|
||
|
myViewHolder2.rectangleRelativeLayout.setSpanSize(a.H);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public ShortcutAdapter(Context context, C0907Rf c0907Rf, InterfaceC12819fII interfaceC12819fII) {
|
||
|
this.d = context;
|
||
|
this.e = c0907Rf;
|
||
|
this.c = interfaceC12819fII;
|
||
|
this.b = nMh.getDrawable(context, R.drawable.biller_place_holder);
|
||
|
setHasStableIds(true);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final long getItemId(int i) {
|
||
|
return this.e.a(i).h;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final int getItemViewType(int i) {
|
||
|
return this.e.a(i).L.ordinal();
|
||
|
}
|
||
|
|
||
|
/* renamed from: com.scb.phone.view.adapter.landingpage.ShortcutAdapter$5, reason: invalid class name */
|
||
|
/* loaded from: classes5.dex */
|
||
|
static /* synthetic */ class AnonymousClass5 {
|
||
|
static final int[] b;
|
||
|
|
||
|
static {
|
||
|
int[] iArr = new int[EnumC14464fth.values().length];
|
||
|
b = iArr;
|
||
|
try {
|
||
|
iArr[EnumC14464fth.SHORTCUT.ordinal()] = 1;
|
||
|
} catch (NoSuchFieldError unused) {
|
||
|
}
|
||
|
try {
|
||
|
b[EnumC14464fth.HEADER.ordinal()] = 2;
|
||
|
} catch (NoSuchFieldError unused2) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final int getItemCount() {
|
||
|
return this.e.c.size();
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class MyViewHolder extends Mmw {
|
||
|
int a;
|
||
|
|
||
|
@BindView
|
||
|
ImageView backgroundImageView;
|
||
|
private ShortcutAdapter d;
|
||
|
|
||
|
@BindView
|
||
|
TextView descTextView;
|
||
|
|
||
|
@BindView
|
||
|
ImageView iconImageView;
|
||
|
|
||
|
@BindView
|
||
|
RectangleRelativeLayout rectangleRelativeLayout;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
MyViewHolder(ShortcutAdapter shortcutAdapter, View view) {
|
||
|
super(view);
|
||
|
this.d = shortcutAdapter;
|
||
|
ButterKnife.c(this, this.itemView);
|
||
|
view.setOnClickListener(new View.OnClickListener(this) { // from class: o.ewb
|
||
|
private ShortcutAdapter.MyViewHolder d;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view2) {
|
||
|
ShortcutAdapter.MyViewHolder.d(this.d);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = this;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void d(MyViewHolder myViewHolder) {
|
||
|
if (myViewHolder.d.e.a(myViewHolder.a).L == AyW.SHORTCUT) {
|
||
|
myViewHolder.d.c.c(myViewHolder.d.e.a(myViewHolder.a).x);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
||
|
public final /* synthetic */ MyViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||
|
View inflate;
|
||
|
LayoutInflater from = LayoutInflater.from(viewGroup.getContext());
|
||
|
if (AnonymousClass5.b[EnumC14464fth.a(i).ordinal()] == 1) {
|
||
|
inflate = from.inflate(R.layout.2131559156, viewGroup, false);
|
||
|
} else {
|
||
|
inflate = from.inflate(R.layout.2131559145, viewGroup, false);
|
||
|
}
|
||
|
return new MyViewHolder(this, inflate);
|
||
|
}
|
||
|
}
|