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

109 lines
3.9 KiB
Java

package o;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.scb.phone.view.adapter.creditcardpurchase.TenureViewHolder;
import java.util.List;
import o.C12160esv;
/* renamed from: o.esv, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C12160esv extends RecyclerView.Sts<TenureViewHolder> {
private LWm a;
public List<HO> c;
public Integer e;
/* renamed from: o.esv$LWm */
/* loaded from: classes5.dex */
public interface LWm {
void e(HO ho);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(TenureViewHolder tenureViewHolder, int i) {
TenureViewHolder tenureViewHolder2 = tenureViewHolder;
C14957gcv.e(tenureViewHolder2, "");
final HO ho = this.c.get(i);
Integer num = this.e;
final LWm lWm = this.a;
C14957gcv.e(ho, "");
C14957gcv.e(lWm, "");
tenureViewHolder2.itemView.setOnClickListener(new View.OnClickListener(lWm, ho) { // from class: o.esw
private HO b;
private C12160esv.LWm e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
TenureViewHolder.b(this.e, this.b);
}
{
this.e = lWm;
this.b = ho;
}
});
TextView textView = tenureViewHolder2.tvTenure;
TextView textView2 = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(String.valueOf(ho.j));
int i2 = ho.j;
if (num != null && num.intValue() == i2) {
RelativeLayout relativeLayout = tenureViewHolder2.rlContainer;
if (relativeLayout == null) {
C14957gcv.a("");
relativeLayout = null;
}
relativeLayout.setBackground(nMh.getDrawable(tenureViewHolder2.b.getContext(), com.scb.phone.R.drawable.bg_button_amount_purple));
TextView textView3 = tenureViewHolder2.tvTenure;
if (textView3 != null) {
textView2 = textView3;
} else {
C14957gcv.a("");
}
textView2.setTextColor(nMh.getColor(tenureViewHolder2.b.getContext(), com.scb.phone.R.color.f14042131100912));
return;
}
RelativeLayout relativeLayout2 = tenureViewHolder2.rlContainer;
if (relativeLayout2 == null) {
C14957gcv.a("");
relativeLayout2 = null;
}
relativeLayout2.setBackground(nMh.getDrawable(tenureViewHolder2.b.getContext(), com.scb.phone.R.drawable.bg_button_amount));
TextView textView4 = tenureViewHolder2.tvTenure;
if (textView4 != null) {
textView2 = textView4;
} else {
C14957gcv.a("");
}
textView2.setTextColor(nMh.getColor(tenureViewHolder2.b.getContext(), com.scb.phone.R.color.f13682131100876));
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ TenureViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(com.scb.phone.R.layout.2131559989, viewGroup, false);
C14957gcv.c(inflate, "");
return new TenureViewHolder(inflate);
}
public C12160esv(List<HO> list, Integer num, LWm lWm) {
C14957gcv.e(list, "");
C14957gcv.e(lWm, "");
this.c = list;
this.e = num;
this.a = lWm;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.c.size();
}
}