what-the-bank/sources/com/scb/phone/view/adapter/investment/discover/HighlightRecycleAdapter.java

243 lines
8.4 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.investment.discover;
import android.graphics.Bitmap;
import android.net.Uri;
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.investment.discover.HighlightRecycleAdapter;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
import o.AbstractC12010eqD;
import o.C0840Pr;
import o.C13020fOa;
import o.C14957gcv;
import o.InterfaceC12980fNE;
import o.fNW;
import o.nMh;
import o.pyT;
/* loaded from: classes5.dex */
public final class HighlightRecycleAdapter extends AbstractC12010eqD<C0840Pr, MyViewHolder> {
HBt<C0840Pr> b;
private ArrayList<C0840Pr> d;
/* loaded from: classes5.dex */
public interface HBt<T> {
void c(T t, String str);
}
/* loaded from: classes5.dex */
public final class MyViewHolder_ViewBinding implements Unbinder {
private MyViewHolder e;
public MyViewHolder_ViewBinding(MyViewHolder myViewHolder, View view) {
this.e = myViewHolder;
myViewHolder.tvHighlightTitle = (TextView) pyT.e(view, R.id.tv_highlight_title, "field 'tvHighlightTitle'", TextView.class);
myViewHolder.tvHighlightDesc = (TextView) pyT.e(view, R.id.tv_highlight_desc, "field 'tvHighlightDesc'", TextView.class);
myViewHolder.tvHighlightCaption = (TextView) pyT.e(view, R.id.tv_highlight_caption, "field 'tvHighlightCaption'", TextView.class);
myViewHolder.ivHighlight = (ImageView) pyT.e(view, R.id.iv_highlight, "field 'ivHighlight'", ImageView.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.tvHighlightTitle = null;
myViewHolder.tvHighlightDesc = null;
myViewHolder.tvHighlightCaption = null;
myViewHolder.ivHighlight = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(RecyclerView.zJl zjl, int i) {
MyViewHolder myViewHolder = (MyViewHolder) zjl;
C14957gcv.e(myViewHolder, "");
int b = b(i);
C0840Pr c0840Pr = this.d.get(b);
C14957gcv.c(c0840Pr, "");
final C0840Pr c0840Pr2 = c0840Pr;
final String valueOf = String.valueOf(b + 1);
C14957gcv.e(c0840Pr2, "");
C14957gcv.e(valueOf, "");
ButterKnife.c(myViewHolder, myViewHolder.itemView);
View view = myViewHolder.itemView;
final HighlightRecycleAdapter highlightRecycleAdapter = myViewHolder.c;
view.setOnClickListener(new View.OnClickListener(highlightRecycleAdapter, c0840Pr2, valueOf) { // from class: o.evu
private String b;
private HighlightRecycleAdapter d;
private C0840Pr e;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
HighlightRecycleAdapter.MyViewHolder.a(this.d, this.e, this.b);
}
{
this.d = highlightRecycleAdapter;
this.e = c0840Pr2;
this.b = valueOf;
}
});
TextView textView = myViewHolder.tvHighlightTitle;
ImageView imageView = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(c0840Pr2.d);
TextView textView2 = myViewHolder.tvHighlightDesc;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(c0840Pr2.a);
TextView textView3 = myViewHolder.tvHighlightCaption;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(c0840Pr2.e);
if (c0840Pr2.c.length() > 0) {
C13020fOa e = Picasso.d().e(c0840Pr2.c);
e.e = true;
Bitmap.Config config = Bitmap.Config.RGB_565;
fNW.IeS ieS = e.a;
if (config != null) {
ieS.a = config;
fNW.IeS ieS2 = e.a;
if (!ieS2.d) {
ieS2.e = true;
ieS2.c = 17;
C13020fOa b2 = e.b(R.color.f3412131099849);
ImageView imageView2 = myViewHolder.ivHighlight;
if (imageView2 != null) {
imageView = imageView2;
} else {
C14957gcv.a("");
}
b2.aBu_(imageView, new MyViewHolder.IeS(c0840Pr2));
return;
}
throw new IllegalStateException("Center crop can not be used after calling centerInside");
}
throw new IllegalArgumentException("config == null");
}
Picasso d = Picasso.d();
ImageView imageView3 = myViewHolder.ivHighlight;
if (imageView3 == null) {
C14957gcv.a("");
imageView3 = null;
}
if (imageView3 == null) {
throw new IllegalArgumentException("view cannot be null.");
}
d.e(imageView3);
ImageView imageView4 = myViewHolder.ivHighlight;
if (imageView4 != null) {
imageView = imageView4;
} else {
C14957gcv.a("");
}
imageView.setImageDrawable(nMh.getDrawable(myViewHolder.itemView.getContext(), R.color.f3412131099849));
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559994, viewGroup, false);
C14957gcv.c(inflate, "");
return new MyViewHolder(this, inflate);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public HighlightRecycleAdapter(ArrayList<C0840Pr> arrayList, HBt<C0840Pr> hBt) {
super(arrayList);
C14957gcv.e(arrayList, "");
C14957gcv.e(hBt, "");
this.d = arrayList;
this.b = hBt;
}
/* loaded from: classes5.dex */
public final class MyViewHolder extends RecyclerView.zJl {
final HighlightRecycleAdapter c;
@BindView
public ImageView ivHighlight;
@BindView
public TextView tvHighlightCaption;
@BindView
public TextView tvHighlightDesc;
@BindView
public TextView tvHighlightTitle;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public MyViewHolder(HighlightRecycleAdapter highlightRecycleAdapter, View view) {
super(view);
C14957gcv.e(view, "");
this.c = highlightRecycleAdapter;
}
/* loaded from: classes5.dex */
public static final class IeS implements InterfaceC12980fNE {
private C0840Pr d;
@Override // o.InterfaceC12980fNE
public final void d() {
}
IeS(C0840Pr c0840Pr) {
this.d = c0840Pr;
}
@Override // o.InterfaceC12980fNE
public final void b(Exception exc) {
Uri parse;
C14957gcv.e(exc, "");
Picasso d = Picasso.d();
String str = this.d.c;
if (str == null || (parse = Uri.parse(str)) == null) {
return;
}
d.b.b(parse.toString());
}
}
public static /* synthetic */ void a(HighlightRecycleAdapter highlightRecycleAdapter, C0840Pr c0840Pr, String str) {
C14957gcv.e(highlightRecycleAdapter, "");
C14957gcv.e(c0840Pr, "");
C14957gcv.e(str, "");
highlightRecycleAdapter.b.c(c0840Pr, str);
}
}
/* loaded from: classes5.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
static {
new IeS((byte) 0);
}
}