449 lines
17 KiB
Java
449 lines
17 KiB
Java
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.RecommendRecyclerAdapter;
|
|
import com.scb.phone.view.custom.ImageTextView;
|
|
import com.squareup.picasso.Picasso;
|
|
import java.util.ArrayList;
|
|
import o.AbstractC12010eqD;
|
|
import o.C0839Pq;
|
|
import o.C13020fOa;
|
|
import o.C14957gcv;
|
|
import o.EnumC0823Pg;
|
|
import o.EnumC0828Pi;
|
|
import o.InterfaceC12980fNE;
|
|
import o.fNW;
|
|
import o.nMh;
|
|
import o.pyT;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class RecommendRecyclerAdapter extends AbstractC12010eqD<C0839Pq, RecyclerView.zJl> {
|
|
HBt<C0839Pq> b;
|
|
private ArrayList<C0839Pq> d;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public interface HBt<T> {
|
|
void b(T t);
|
|
|
|
void e(T t);
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class IpoRecommendViewHolder_ViewBinding implements Unbinder {
|
|
private IpoRecommendViewHolder e;
|
|
|
|
public IpoRecommendViewHolder_ViewBinding(IpoRecommendViewHolder ipoRecommendViewHolder, View view) {
|
|
this.e = ipoRecommendViewHolder;
|
|
ipoRecommendViewHolder.tvNameIpo = (TextView) pyT.e(view, R.id.tvNameIpo, "field 'tvNameIpo'", TextView.class);
|
|
ipoRecommendViewHolder.tvDescriptionIpo = (TextView) pyT.e(view, R.id.tvDescriptionIpo, "field 'tvDescriptionIpo'", TextView.class);
|
|
ipoRecommendViewHolder.tvDateIpo = (TextView) pyT.e(view, R.id.tvDateIpo, "field 'tvDateIpo'", TextView.class);
|
|
ipoRecommendViewHolder.tvRecommendCaptionIpo = (TextView) pyT.e(view, R.id.tvRecommendCaptionIpo, "field 'tvRecommendCaptionIpo'", TextView.class);
|
|
ipoRecommendViewHolder.ivRecommendIpo = (ImageView) pyT.e(view, R.id.ivRecommendIpo, "field 'ivRecommendIpo'", ImageView.class);
|
|
}
|
|
|
|
@Override // butterknife.Unbinder
|
|
public final void a() {
|
|
IpoRecommendViewHolder ipoRecommendViewHolder = this.e;
|
|
if (ipoRecommendViewHolder == null) {
|
|
throw new IllegalStateException("Bindings already cleared.");
|
|
}
|
|
this.e = null;
|
|
ipoRecommendViewHolder.tvNameIpo = null;
|
|
ipoRecommendViewHolder.tvDescriptionIpo = null;
|
|
ipoRecommendViewHolder.tvDateIpo = null;
|
|
ipoRecommendViewHolder.tvRecommendCaptionIpo = null;
|
|
ipoRecommendViewHolder.ivRecommendIpo = null;
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class RecommendViewHolder_ViewBinding implements Unbinder {
|
|
private RecommendViewHolder e;
|
|
|
|
public RecommendViewHolder_ViewBinding(RecommendViewHolder recommendViewHolder, View view) {
|
|
this.e = recommendViewHolder;
|
|
recommendViewHolder.tvName = (TextView) pyT.e(view, R.id.tvName, "field 'tvName'", TextView.class);
|
|
recommendViewHolder.tvFundNav = (ImageTextView) pyT.e(view, R.id.tvFundNav, "field 'tvFundNav'", ImageTextView.class);
|
|
recommendViewHolder.tvCurrentChange = (TextView) pyT.e(view, R.id.tvCurrentChange, "field 'tvCurrentChange'", TextView.class);
|
|
recommendViewHolder.tvDate = (TextView) pyT.e(view, R.id.tvDate, "field 'tvDate'", TextView.class);
|
|
recommendViewHolder.tvRecommendCaption = (TextView) pyT.e(view, R.id.tvRecommendCaption, "field 'tvRecommendCaption'", TextView.class);
|
|
recommendViewHolder.ivRecommend = (ImageView) pyT.e(view, R.id.ivRecommend, "field 'ivRecommend'", ImageView.class);
|
|
}
|
|
|
|
@Override // butterknife.Unbinder
|
|
public final void a() {
|
|
RecommendViewHolder recommendViewHolder = this.e;
|
|
if (recommendViewHolder == null) {
|
|
throw new IllegalStateException("Bindings already cleared.");
|
|
}
|
|
this.e = null;
|
|
recommendViewHolder.tvName = null;
|
|
recommendViewHolder.tvFundNav = null;
|
|
recommendViewHolder.tvCurrentChange = null;
|
|
recommendViewHolder.tvDate = null;
|
|
recommendViewHolder.tvRecommendCaption = null;
|
|
recommendViewHolder.ivRecommend = null;
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public RecommendRecyclerAdapter(ArrayList<C0839Pq> arrayList, HBt<C0839Pq> hBt) {
|
|
super(arrayList);
|
|
C14957gcv.e(arrayList, "");
|
|
C14957gcv.e(hBt, "");
|
|
this.d = arrayList;
|
|
this.b = hBt;
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class LWm {
|
|
private LWm() {
|
|
}
|
|
|
|
public /* synthetic */ LWm(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final int getItemViewType(int i) {
|
|
return C14957gcv.b((Object) EnumC0828Pi.IPO.name(), (Object) this.d.get(b(i)).b) ? 1 : 0;
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
|
|
C14957gcv.e(viewGroup, "");
|
|
if (i == 1) {
|
|
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559992, viewGroup, false);
|
|
C14957gcv.c(inflate, "");
|
|
return new IpoRecommendViewHolder(this, inflate);
|
|
}
|
|
View inflate2 = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559991, viewGroup, false);
|
|
C14957gcv.c(inflate2, "");
|
|
return new RecommendViewHolder(this, inflate2);
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final void onBindViewHolder(RecyclerView.zJl zjl, int i) {
|
|
C14957gcv.e(zjl, "");
|
|
C0839Pq c0839Pq = this.d.get(b(i));
|
|
C14957gcv.c(c0839Pq, "");
|
|
final C0839Pq c0839Pq2 = c0839Pq;
|
|
ImageView imageView = null;
|
|
if (zjl instanceof RecommendViewHolder) {
|
|
RecommendViewHolder recommendViewHolder = (RecommendViewHolder) zjl;
|
|
C14957gcv.e(c0839Pq2, "");
|
|
ButterKnife.c(recommendViewHolder, recommendViewHolder.itemView);
|
|
View view = recommendViewHolder.itemView;
|
|
final RecommendRecyclerAdapter recommendRecyclerAdapter = recommendViewHolder.d;
|
|
view.setOnClickListener(new View.OnClickListener(recommendRecyclerAdapter, c0839Pq2) { // from class: o.evt
|
|
private RecommendRecyclerAdapter a;
|
|
private C0839Pq d;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view2) {
|
|
RecommendRecyclerAdapter.RecommendViewHolder.c(this.a, this.d);
|
|
}
|
|
|
|
{
|
|
this.a = recommendRecyclerAdapter;
|
|
this.d = c0839Pq2;
|
|
}
|
|
});
|
|
TextView textView = recommendViewHolder.tvName;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(c0839Pq2.c);
|
|
ImageTextView imageTextView = recommendViewHolder.tvFundNav;
|
|
if (imageTextView == null) {
|
|
C14957gcv.a("");
|
|
imageTextView = null;
|
|
}
|
|
imageTextView.setText(c0839Pq2.j);
|
|
String str = c0839Pq2.j;
|
|
if (str == null || str.length() == 0) {
|
|
ImageTextView imageTextView2 = recommendViewHolder.tvFundNav;
|
|
if (imageTextView2 == null) {
|
|
C14957gcv.a("");
|
|
imageTextView2 = null;
|
|
}
|
|
imageTextView2.setText(" ");
|
|
}
|
|
TextView textView2 = recommendViewHolder.tvCurrentChange;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
textView2.setText(c0839Pq2.a);
|
|
TextView textView3 = recommendViewHolder.tvDate;
|
|
if (textView3 == null) {
|
|
C14957gcv.a("");
|
|
textView3 = null;
|
|
}
|
|
textView3.setText(c0839Pq2.h);
|
|
TextView textView4 = recommendViewHolder.tvRecommendCaption;
|
|
if (textView4 == null) {
|
|
C14957gcv.a("");
|
|
textView4 = null;
|
|
}
|
|
textView4.setText(c0839Pq2.d);
|
|
RecommendRecyclerAdapter recommendRecyclerAdapter2 = recommendViewHolder.d;
|
|
ImageTextView imageTextView3 = recommendViewHolder.tvFundNav;
|
|
if (imageTextView3 == null) {
|
|
C14957gcv.a("");
|
|
imageTextView3 = null;
|
|
}
|
|
int i2 = Sts.e[c0839Pq2.e.ordinal()];
|
|
if (i2 == 1) {
|
|
imageTextView3.setDrawable(nMh.getDrawable(imageTextView3.getContext(), R.drawable.ic_triangle_up_dark_gray));
|
|
imageTextView3.setVisibility(0);
|
|
} else if (i2 == 2) {
|
|
imageTextView3.setDrawable(nMh.getDrawable(imageTextView3.getContext(), R.drawable.ic_triangle_down_dark_gray));
|
|
imageTextView3.setVisibility(0);
|
|
} else {
|
|
imageTextView3.c = null;
|
|
CharSequence text = imageTextView3.getText();
|
|
if (text != null) {
|
|
imageTextView3.setText(text.toString().replace("[scbImage]", ""));
|
|
}
|
|
}
|
|
RecommendRecyclerAdapter recommendRecyclerAdapter3 = recommendViewHolder.d;
|
|
TextView textView5 = recommendViewHolder.tvCurrentChange;
|
|
if (textView5 == null) {
|
|
C14957gcv.a("");
|
|
textView5 = null;
|
|
}
|
|
int i3 = Sts.e[c0839Pq2.e.ordinal()];
|
|
if (i3 != 1) {
|
|
if (i3 != 2) {
|
|
if (textView5 != null) {
|
|
textView5.setTextColor(nMh.getColor(textView5.getContext(), R.color.f1852131099685));
|
|
}
|
|
} else if (textView5 != null) {
|
|
textView5.setTextColor(nMh.getColor(textView5.getContext(), R.color.f3462131099854));
|
|
}
|
|
} else if (textView5 != null) {
|
|
textView5.setTextColor(nMh.getColor(textView5.getContext(), R.color.f3432131099851));
|
|
}
|
|
RecommendRecyclerAdapter recommendRecyclerAdapter4 = recommendViewHolder.d;
|
|
ImageView imageView2 = recommendViewHolder.ivRecommend;
|
|
if (imageView2 != null) {
|
|
imageView = imageView2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
ant_(imageView, c0839Pq2.i);
|
|
return;
|
|
}
|
|
if (zjl instanceof IpoRecommendViewHolder) {
|
|
IpoRecommendViewHolder ipoRecommendViewHolder = (IpoRecommendViewHolder) zjl;
|
|
C14957gcv.e(c0839Pq2, "");
|
|
ButterKnife.c(ipoRecommendViewHolder, ipoRecommendViewHolder.itemView);
|
|
View view2 = ipoRecommendViewHolder.itemView;
|
|
final RecommendRecyclerAdapter recommendRecyclerAdapter5 = ipoRecommendViewHolder.c;
|
|
view2.setOnClickListener(new View.OnClickListener(recommendRecyclerAdapter5, c0839Pq2) { // from class: o.evs
|
|
private RecommendRecyclerAdapter a;
|
|
private C0839Pq d;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view3) {
|
|
RecommendRecyclerAdapter.IpoRecommendViewHolder.e(this.a, this.d);
|
|
}
|
|
|
|
{
|
|
this.a = recommendRecyclerAdapter5;
|
|
this.d = c0839Pq2;
|
|
}
|
|
});
|
|
TextView textView6 = ipoRecommendViewHolder.tvNameIpo;
|
|
if (textView6 == null) {
|
|
C14957gcv.a("");
|
|
textView6 = null;
|
|
}
|
|
textView6.setText(c0839Pq2.c);
|
|
TextView textView7 = ipoRecommendViewHolder.tvDescriptionIpo;
|
|
if (textView7 == null) {
|
|
C14957gcv.a("");
|
|
textView7 = null;
|
|
}
|
|
textView7.setText(c0839Pq2.g);
|
|
TextView textView8 = ipoRecommendViewHolder.tvDateIpo;
|
|
if (textView8 == null) {
|
|
C14957gcv.a("");
|
|
textView8 = null;
|
|
}
|
|
textView8.setText(c0839Pq2.f);
|
|
TextView textView9 = ipoRecommendViewHolder.tvRecommendCaptionIpo;
|
|
if (textView9 == null) {
|
|
C14957gcv.a("");
|
|
textView9 = null;
|
|
}
|
|
textView9.setText(c0839Pq2.d);
|
|
RecommendRecyclerAdapter recommendRecyclerAdapter6 = ipoRecommendViewHolder.c;
|
|
ImageView imageView3 = ipoRecommendViewHolder.ivRecommendIpo;
|
|
if (imageView3 != null) {
|
|
imageView = imageView3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
ant_(imageView, c0839Pq2.i);
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class RVV implements InterfaceC12980fNE {
|
|
private String c;
|
|
|
|
@Override // o.InterfaceC12980fNE
|
|
public final void d() {
|
|
}
|
|
|
|
RVV(String str) {
|
|
this.c = str;
|
|
}
|
|
|
|
@Override // o.InterfaceC12980fNE
|
|
public final void b(Exception exc) {
|
|
Uri parse;
|
|
C14957gcv.e(exc, "");
|
|
Picasso d = Picasso.d();
|
|
String str = this.c;
|
|
if (str == null || (parse = Uri.parse(str)) == null) {
|
|
return;
|
|
}
|
|
d.b.b(parse.toString());
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class RecommendViewHolder extends RecyclerView.zJl {
|
|
final RecommendRecyclerAdapter d;
|
|
|
|
@BindView
|
|
public ImageView ivRecommend;
|
|
|
|
@BindView
|
|
public TextView tvCurrentChange;
|
|
|
|
@BindView
|
|
public TextView tvDate;
|
|
|
|
@BindView
|
|
public ImageTextView tvFundNav;
|
|
|
|
@BindView
|
|
public TextView tvName;
|
|
|
|
@BindView
|
|
public TextView tvRecommendCaption;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public RecommendViewHolder(RecommendRecyclerAdapter recommendRecyclerAdapter, View view) {
|
|
super(view);
|
|
C14957gcv.e(view, "");
|
|
this.d = recommendRecyclerAdapter;
|
|
}
|
|
|
|
public static /* synthetic */ void c(RecommendRecyclerAdapter recommendRecyclerAdapter, C0839Pq c0839Pq) {
|
|
C14957gcv.e(recommendRecyclerAdapter, "");
|
|
C14957gcv.e(c0839Pq, "");
|
|
recommendRecyclerAdapter.b.b(c0839Pq);
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class IpoRecommendViewHolder extends RecyclerView.zJl {
|
|
final RecommendRecyclerAdapter c;
|
|
|
|
@BindView
|
|
public ImageView ivRecommendIpo;
|
|
|
|
@BindView
|
|
public TextView tvDateIpo;
|
|
|
|
@BindView
|
|
public TextView tvDescriptionIpo;
|
|
|
|
@BindView
|
|
public TextView tvNameIpo;
|
|
|
|
@BindView
|
|
public TextView tvRecommendCaptionIpo;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public IpoRecommendViewHolder(RecommendRecyclerAdapter recommendRecyclerAdapter, View view) {
|
|
super(view);
|
|
C14957gcv.e(view, "");
|
|
this.c = recommendRecyclerAdapter;
|
|
}
|
|
|
|
public static /* synthetic */ void e(RecommendRecyclerAdapter recommendRecyclerAdapter, C0839Pq c0839Pq) {
|
|
C14957gcv.e(recommendRecyclerAdapter, "");
|
|
C14957gcv.e(c0839Pq, "");
|
|
recommendRecyclerAdapter.b.e(c0839Pq);
|
|
}
|
|
}
|
|
|
|
private static /* synthetic */ void ant_(ImageView imageView, String str) {
|
|
if (str.length() > 0) {
|
|
C13020fOa e = Picasso.d().e(str);
|
|
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;
|
|
e.b(R.color.f3412131099849).aBu_(imageView, new RVV(str));
|
|
return;
|
|
}
|
|
throw new IllegalStateException("Center crop can not be used after calling centerInside");
|
|
}
|
|
throw new IllegalArgumentException("config == null");
|
|
}
|
|
Picasso d = Picasso.d();
|
|
if (imageView == null) {
|
|
throw new IllegalArgumentException("view cannot be null.");
|
|
}
|
|
d.e(imageView);
|
|
imageView.setImageDrawable(nMh.getDrawable(imageView.getContext(), R.color.f3412131099849));
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final /* synthetic */ class Sts {
|
|
public static final int[] e;
|
|
|
|
static {
|
|
int[] iArr = new int[EnumC0823Pg.values().length];
|
|
try {
|
|
iArr[EnumC0823Pg.POSITIVE_TYPE.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
iArr[EnumC0823Pg.NEGATIVE_TYPE.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
e = iArr;
|
|
}
|
|
}
|
|
|
|
static {
|
|
new LWm((byte) 0);
|
|
}
|
|
}
|