what-the-bank/sources/com/scb/phone/view/activity/prepaid/PrepaidCardAdapter.java

162 lines
6.0 KiB
Java

package com.scb.phone.view.activity.prepaid;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
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.squareup.picasso.Picasso;
import java.util.ArrayList;
import java.util.List;
import o.InterfaceC9554dlt;
import o.WYJ;
import o.pyT;
/* loaded from: classes5.dex */
public final class PrepaidCardAdapter extends WYJ {
List<? extends InterfaceC9554dlt.IeS> d = new ArrayList();
private final String e;
@Override // o.WYJ
public final int getItemPosition(Object obj) {
return -2;
}
@Override // o.WYJ
public final boolean isViewFromObject(View view, Object obj) {
return view == obj;
}
/* loaded from: classes5.dex */
public class PrepaidHolder_ViewBinding implements Unbinder {
private PrepaidHolder b;
public PrepaidHolder_ViewBinding(PrepaidHolder prepaidHolder, View view) {
this.b = prepaidHolder;
prepaidHolder.tvNickname = (TextView) pyT.e(view, R.id.tv_nickname, "field 'tvNickname'", TextView.class);
prepaidHolder.tvLastNumber = (TextView) pyT.e(view, R.id.card_number_text_view, "field 'tvLastNumber'", TextView.class);
prepaidHolder.tvFrontNumber = (TextView) pyT.e(view, R.id.card_number_front_text_view, "field 'tvFrontNumber'", TextView.class);
prepaidHolder.tvSecondFrontNumber = (TextView) pyT.e(view, R.id.card_number_2nd_front_text_view, "field 'tvSecondFrontNumber'", TextView.class);
prepaidHolder.tvPoint = (TextView) pyT.e(view, R.id.tv_point, "field 'tvPoint'", TextView.class);
prepaidHolder.ivCard = (ImageView) pyT.e(view, R.id.iv_card, "field 'ivCard'", ImageView.class);
prepaidHolder.lloverlayContainer = (LinearLayout) pyT.e(view, R.id.ll_overlay_container, "field 'lloverlayContainer'", LinearLayout.class);
prepaidHolder.ivThumb = (ImageView) pyT.e(view, R.id.iv_thumb, "field 'ivThumb'", ImageView.class);
prepaidHolder.tvOverlayDescription = (TextView) pyT.e(view, R.id.tv_overlay_description, "field 'tvOverlayDescription'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
PrepaidHolder prepaidHolder = this.b;
if (prepaidHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.b = null;
prepaidHolder.tvNickname = null;
prepaidHolder.tvLastNumber = null;
prepaidHolder.tvFrontNumber = null;
prepaidHolder.tvSecondFrontNumber = null;
prepaidHolder.tvPoint = null;
prepaidHolder.ivCard = null;
prepaidHolder.lloverlayContainer = null;
prepaidHolder.ivThumb = null;
prepaidHolder.tvOverlayDescription = null;
}
}
public PrepaidCardAdapter(String str) {
this.e = str;
}
@Override // o.WYJ
public final int getCount() {
return this.d.size();
}
@Override // o.WYJ
public final Object instantiateItem(ViewGroup viewGroup, int i) {
PrepaidHolder prepaidHolder = new PrepaidHolder(viewGroup, this.e);
InterfaceC9554dlt.IeS ieS = this.d.get(i);
prepaidHolder.tvNickname.setVisibility(0);
prepaidHolder.tvNickname.setText(ieS.d().l);
prepaidHolder.tvFrontNumber.setText(ieS.c());
prepaidHolder.tvSecondFrontNumber.setText(ieS.f());
prepaidHolder.tvLastNumber.setText(ieS.a());
if (ieS.d() != null && !TextUtils.isEmpty(ieS.d().m)) {
prepaidHolder.lloverlayContainer.setVisibility(0);
prepaidHolder.tvOverlayDescription.setText(ieS.d().m);
prepaidHolder.tvPoint.setVisibility(8);
} else {
prepaidHolder.lloverlayContainer.setVisibility(8);
if (!ieS.d().d.contains("SHOW_TRAVEL_DETAILS")) {
if (ieS.h()) {
prepaidHolder.tvPoint.setText(prepaidHolder.a);
prepaidHolder.tvPoint.setBackgroundResource(R.drawable.trapezoid_gray);
prepaidHolder.tvPoint.setVisibility(0);
} else if (ieS.g() == null) {
prepaidHolder.tvPoint.setVisibility(8);
} else {
prepaidHolder.tvPoint.setText(ieS.b());
prepaidHolder.tvPoint.setBackgroundResource(R.drawable.trapezoid_purple);
prepaidHolder.tvPoint.setVisibility(0);
}
}
}
if (ieS.j()) {
prepaidHolder.ivThumb.setImageResource(R.mipmap.2131755011);
}
Picasso.d().e(ieS.e()).b(R.drawable.default_card_without_logo).e(R.drawable.default_card_without_logo).aBu_(prepaidHolder.ivCard, null);
viewGroup.addView(prepaidHolder.itemView);
return prepaidHolder.itemView;
}
@Override // o.WYJ
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
viewGroup.removeView((View) obj);
}
/* loaded from: classes5.dex */
public static class PrepaidHolder extends RecyclerView.zJl {
final String a;
@BindView
ImageView ivCard;
@BindView
ImageView ivThumb;
@BindView
LinearLayout lloverlayContainer;
@BindView
TextView tvFrontNumber;
@BindView
TextView tvLastNumber;
@BindView
TextView tvNickname;
@BindView
TextView tvOverlayDescription;
@BindView
TextView tvPoint;
@BindView
TextView tvSecondFrontNumber;
public PrepaidHolder(ViewGroup viewGroup, String str) {
super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559990, viewGroup, false));
this.a = str;
ButterKnife.c(this, this.itemView);
}
}
}