what-the-bank/sources/com/scb/phone/view/adapter/debitcardbenefit/DebitCardBenefitLandingAdap...

176 lines
6.3 KiB
Java

package com.scb.phone.view.adapter.debitcardbenefit;
import android.content.Context;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
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.debitcardbenefit.DebitCardBenefitLandingAdapter;
import java.util.List;
import o.C0562Jl;
import o.C10456eEq;
import o.C14957gcv;
import o.OJA;
import o.PNS;
import o.RBw;
import o.nMh;
import o.pyT;
/* loaded from: classes5.dex */
public final class DebitCardBenefitLandingAdapter extends RecyclerView.Sts<CardViewHolder> {
private final IeS a;
private Context b;
private final List<C0562Jl> d;
/* loaded from: classes5.dex */
public interface IeS {
void e(C0562Jl c0562Jl);
}
/* loaded from: classes5.dex */
public final class CardViewHolder_ViewBinding implements Unbinder {
private CardViewHolder c;
public CardViewHolder_ViewBinding(CardViewHolder cardViewHolder, View view) {
this.c = cardViewHolder;
cardViewHolder.ivBenefit = (ImageView) pyT.e(view, R.id.iv_benefit, "field 'ivBenefit'", ImageView.class);
cardViewHolder.tvBenefit = (TextView) pyT.e(view, R.id.tv_benefit, "field 'tvBenefit'", TextView.class);
cardViewHolder.tvBenefitDescription = (TextView) pyT.e(view, R.id.tv_benefit_description, "field 'tvBenefitDescription'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
CardViewHolder cardViewHolder = this.c;
if (cardViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
cardViewHolder.ivBenefit = null;
cardViewHolder.tvBenefit = null;
cardViewHolder.tvBenefitDescription = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(CardViewHolder cardViewHolder, int i) {
CardViewHolder cardViewHolder2 = cardViewHolder;
C14957gcv.e(cardViewHolder2, "");
final C0562Jl c0562Jl = this.d.get(i);
final IeS ieS = this.a;
C14957gcv.e(c0562Jl, "");
C14957gcv.e(ieS, "");
ImageView imageView = cardViewHolder2.ivBenefit;
TextView textView = null;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
C10456eEq.aqe_(imageView, c0562Jl.e, new PNS().c(R.color.f3412131099849).a(R.color.f3412131099849).c(RBw.a, new OJA()));
DebitCardBenefitLandingAdapter debitCardBenefitLandingAdapter = cardViewHolder2.d;
String str = c0562Jl.c;
String str2 = c0562Jl.a;
ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(nMh.getColor(debitCardBenefitLandingAdapter.b, R.color.f13582131100866));
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append(" ");
sb.append(str2);
String obj = sb.toString();
SpannableString spannableString = new SpannableString(obj);
spannableString.setSpan(foregroundColorSpan, str.length(), obj.length(), 34);
if (str2.length() == 0) {
TextView textView2 = cardViewHolder2.tvBenefit;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(c0562Jl.c);
} else {
TextView textView3 = cardViewHolder2.tvBenefit;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(spannableString);
}
TextView textView4 = cardViewHolder2.tvBenefitDescription;
if (textView4 != null) {
textView = textView4;
} else {
C14957gcv.a("");
}
textView.setText(c0562Jl.d);
cardViewHolder2.itemView.setOnClickListener(new View.OnClickListener(ieS, c0562Jl) { // from class: o.esO
private DebitCardBenefitLandingAdapter.IeS a;
private C0562Jl b;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
DebitCardBenefitLandingAdapter.CardViewHolder.d(this.a, this.b);
}
{
this.a = ieS;
this.b = c0562Jl;
}
});
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ CardViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559094, viewGroup, false);
C14957gcv.c(inflate, "");
return new CardViewHolder(this, inflate);
}
public DebitCardBenefitLandingAdapter(Context context, List<C0562Jl> list, IeS ieS) {
C14957gcv.e(context, "");
C14957gcv.e(list, "");
C14957gcv.e(ieS, "");
this.b = context;
this.d = list;
this.a = ieS;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.d.size();
}
/* loaded from: classes5.dex */
public final class CardViewHolder extends RecyclerView.zJl {
final DebitCardBenefitLandingAdapter d;
@BindView
public ImageView ivBenefit;
@BindView
public TextView tvBenefit;
@BindView
public TextView tvBenefitDescription;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CardViewHolder(DebitCardBenefitLandingAdapter debitCardBenefitLandingAdapter, View view) {
super(view);
C14957gcv.e(view, "");
this.d = debitCardBenefitLandingAdapter;
ButterKnife.c(this, view);
}
public static /* synthetic */ void d(IeS ieS, C0562Jl c0562Jl) {
C14957gcv.e(ieS, "");
C14957gcv.e(c0562Jl, "");
ieS.e(c0562Jl);
}
}
}