145 lines
5.1 KiB
Java
145 lines
5.1 KiB
Java
|
package com.scb.phone.view.adapter.gift;
|
||
|
|
||
|
import android.content.Context;
|
||
|
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 java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import o.C12891fKc;
|
||
|
import o.C14957gcv;
|
||
|
import o.WM;
|
||
|
import o.WYJ;
|
||
|
import o.pyT;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class GiftMoneySelectThemeAdapter extends WYJ {
|
||
|
private final LayoutInflater a;
|
||
|
public List<WM> d;
|
||
|
|
||
|
public GiftMoneySelectThemeAdapter(Context context) {
|
||
|
Object systemService = context != null ? context.getSystemService("layout_inflater") : null;
|
||
|
C14957gcv.d(systemService, "");
|
||
|
this.a = (LayoutInflater) systemService;
|
||
|
this.d = new ArrayList();
|
||
|
}
|
||
|
|
||
|
@Override // o.WYJ
|
||
|
public final /* synthetic */ Object instantiateItem(ViewGroup viewGroup, int i) {
|
||
|
C14957gcv.e(viewGroup, "");
|
||
|
TextView textView = null;
|
||
|
View inflate = this.a.inflate(R.layout.2131559372, (ViewGroup) null);
|
||
|
C14957gcv.c(inflate, "");
|
||
|
GiftMoneySelectThemeViewHolder giftMoneySelectThemeViewHolder = new GiftMoneySelectThemeViewHolder(this, inflate);
|
||
|
WM wm = this.d.get(i);
|
||
|
C14957gcv.e(wm, "");
|
||
|
if (giftMoneySelectThemeViewHolder.itemView.getContext() != null) {
|
||
|
ImageView imageView = giftMoneySelectThemeViewHolder.ivGiftCard;
|
||
|
if (imageView == null) {
|
||
|
C14957gcv.a("");
|
||
|
imageView = null;
|
||
|
}
|
||
|
String str = wm.h;
|
||
|
if (str == null) {
|
||
|
str = "";
|
||
|
}
|
||
|
C12891fKc.azC_(imageView, str);
|
||
|
}
|
||
|
TextView textView2 = giftMoneySelectThemeViewHolder.tvGiftCardName;
|
||
|
if (textView2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
textView2 = null;
|
||
|
}
|
||
|
textView2.setText(wm.i);
|
||
|
TextView textView3 = giftMoneySelectThemeViewHolder.tvGiftCardDescription;
|
||
|
if (textView3 != null) {
|
||
|
textView = textView3;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
textView.setText(wm.c);
|
||
|
View view = giftMoneySelectThemeViewHolder.itemView;
|
||
|
C14957gcv.c(view, "");
|
||
|
viewGroup.addView(view, 0);
|
||
|
return view;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class GiftMoneySelectThemeViewHolder_ViewBinding implements Unbinder {
|
||
|
private GiftMoneySelectThemeViewHolder d;
|
||
|
|
||
|
public GiftMoneySelectThemeViewHolder_ViewBinding(GiftMoneySelectThemeViewHolder giftMoneySelectThemeViewHolder, View view) {
|
||
|
this.d = giftMoneySelectThemeViewHolder;
|
||
|
giftMoneySelectThemeViewHolder.ivGiftCard = (ImageView) pyT.e(view, R.id.iv_theme_gift_card, "field 'ivGiftCard'", ImageView.class);
|
||
|
giftMoneySelectThemeViewHolder.tvGiftCardName = (TextView) pyT.e(view, R.id.tv_theme_gift_card_name, "field 'tvGiftCardName'", TextView.class);
|
||
|
giftMoneySelectThemeViewHolder.tvGiftCardDescription = (TextView) pyT.e(view, R.id.tv_theme_gift_card_description, "field 'tvGiftCardDescription'", TextView.class);
|
||
|
}
|
||
|
|
||
|
@Override // butterknife.Unbinder
|
||
|
public final void a() {
|
||
|
GiftMoneySelectThemeViewHolder giftMoneySelectThemeViewHolder = this.d;
|
||
|
if (giftMoneySelectThemeViewHolder == null) {
|
||
|
throw new IllegalStateException("Bindings already cleared.");
|
||
|
}
|
||
|
this.d = null;
|
||
|
giftMoneySelectThemeViewHolder.ivGiftCard = null;
|
||
|
giftMoneySelectThemeViewHolder.tvGiftCardName = null;
|
||
|
giftMoneySelectThemeViewHolder.tvGiftCardDescription = null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.WYJ
|
||
|
public final int getCount() {
|
||
|
return this.d.size();
|
||
|
}
|
||
|
|
||
|
@Override // o.WYJ
|
||
|
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
|
||
|
C14957gcv.e(viewGroup, "");
|
||
|
C14957gcv.e(obj, "");
|
||
|
viewGroup.removeView((View) obj);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class GiftMoneySelectThemeViewHolder extends RecyclerView.zJl {
|
||
|
private GiftMoneySelectThemeAdapter d;
|
||
|
|
||
|
@BindView
|
||
|
public ImageView ivGiftCard;
|
||
|
|
||
|
@BindView
|
||
|
public TextView tvGiftCardDescription;
|
||
|
|
||
|
@BindView
|
||
|
public TextView tvGiftCardName;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
public GiftMoneySelectThemeViewHolder(GiftMoneySelectThemeAdapter giftMoneySelectThemeAdapter, View view) {
|
||
|
super(view);
|
||
|
C14957gcv.e(view, "");
|
||
|
this.d = giftMoneySelectThemeAdapter;
|
||
|
ButterKnife.c(this, this.itemView);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.WYJ
|
||
|
public final boolean isViewFromObject(View view, Object obj) {
|
||
|
C14957gcv.e(view, "");
|
||
|
C14957gcv.e(obj, "");
|
||
|
return view == obj;
|
||
|
}
|
||
|
|
||
|
@Override // o.WYJ
|
||
|
public final int getItemPosition(Object obj) {
|
||
|
C14957gcv.e(obj, "");
|
||
|
return -2;
|
||
|
}
|
||
|
}
|