what-the-bank/sources/com/scb/phone/view/adapter/ntb/UserProfileImageSelectionAd...

93 lines
2.8 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.ntb;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import com.scb.phone.R;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import o.WYJ;
import o.pyT;
/* loaded from: classes5.dex */
public final class UserProfileImageSelectionAdapter extends WYJ {
public List<String> d;
private Map<String, Integer> e;
@Override // o.WYJ
public final boolean isViewFromObject(View view, Object obj) {
return view == obj;
}
/* loaded from: classes5.dex */
public class ItemViewHolder_ViewBinding implements Unbinder {
private ItemViewHolder e;
public ItemViewHolder_ViewBinding(ItemViewHolder itemViewHolder, View view) {
this.e = itemViewHolder;
itemViewHolder.imageAvatar = (ImageView) pyT.e(view, R.id.image_avatar, "field 'imageAvatar'", ImageView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ItemViewHolder itemViewHolder = this.e;
if (itemViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
itemViewHolder.imageAvatar = null;
}
}
public UserProfileImageSelectionAdapter(Map<String, Integer> map) {
this.e = map;
this.d = Arrays.asList((String[]) map.keySet().toArray(new String[map.size()]));
}
@Override // o.WYJ
public final int getCount() {
Map<String, Integer> map = this.e;
if (map == null) {
return 0;
}
return map.size();
}
@Override // o.WYJ
public final Object instantiateItem(ViewGroup viewGroup, int i) {
ItemViewHolder itemViewHolder = new ItemViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559193, (ViewGroup) null));
ImageView imageView = itemViewHolder.imageAvatar;
Map<String, Integer> map = this.e;
List<String> list = this.d;
imageView.setImageResource(map.get(list != null ? list.get(i) : null).intValue());
View view = itemViewHolder.c;
viewGroup.addView(view, 0);
return view;
}
@Override // o.WYJ
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
viewGroup.removeView((View) obj);
}
/* loaded from: classes5.dex */
static class ItemViewHolder extends RecyclerView.zJl {
View c;
@BindView
ImageView imageAvatar;
ItemViewHolder(View view) {
super(view);
this.c = view;
ButterKnife.c(this, view);
}
}
}