what-the-bank/sources/com/scb/phone/view/adapter/common/RadioButtonGroupAdapter.java

162 lines
5.6 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.common;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RadioButton;
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.List;
import o.IT;
import o.gjJ;
import o.pyT;
/* loaded from: classes5.dex */
public final class RadioButtonGroupAdapter extends RecyclerView.Sts<RadioButtonViewGroup> {
private List<IT> a;
private IeS b;
private Integer c;
/* loaded from: classes5.dex */
public interface IeS {
void b(int i);
}
/* loaded from: classes5.dex */
public class RadioButtonViewGroup_ViewBinding implements Unbinder {
private RadioButtonViewGroup e;
public RadioButtonViewGroup_ViewBinding(RadioButtonViewGroup radioButtonViewGroup, View view) {
this.e = radioButtonViewGroup;
radioButtonViewGroup.holder = pyT.a(view, R.id.container, "field 'holder'");
radioButtonViewGroup.rbOption = (RadioButton) pyT.e(view, R.id.rb_option, "field 'rbOption'", RadioButton.class);
radioButtonViewGroup.textLabel = (TextView) pyT.e(view, R.id.text_label, "field 'textLabel'", TextView.class);
radioButtonViewGroup.textHighlightLabel = (TextView) pyT.e(view, R.id.text_highlight_label, "field 'textHighlightLabel'", TextView.class);
radioButtonViewGroup.textDescription = (TextView) pyT.e(view, R.id.text_description, "field 'textDescription'", TextView.class);
radioButtonViewGroup.divider = pyT.a(view, R.id.divider, "field 'divider'");
}
@Override // butterknife.Unbinder
public final void a() {
RadioButtonViewGroup radioButtonViewGroup = this.e;
if (radioButtonViewGroup == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
radioButtonViewGroup.holder = null;
radioButtonViewGroup.rbOption = null;
radioButtonViewGroup.textLabel = null;
radioButtonViewGroup.textHighlightLabel = null;
radioButtonViewGroup.textDescription = null;
radioButtonViewGroup.divider = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(RadioButtonViewGroup radioButtonViewGroup, int i) {
RadioButtonViewGroup radioButtonViewGroup2 = radioButtonViewGroup;
radioButtonViewGroup2.rbOption.setOnClickListener(new LWm(this, i, r2));
if (this.c != null) {
this.a.get(i).c = this.c.intValue() == i;
}
IT it = this.a.get(i);
radioButtonViewGroup2.rbOption.setChecked(it.c);
radioButtonViewGroup2.textLabel.setText(it.d);
radioButtonViewGroup2.textHighlightLabel.setText(it.e);
radioButtonViewGroup2.textHighlightLabel.setVisibility(gjJ.b((CharSequence) it.e) ? 8 : 0);
radioButtonViewGroup2.textDescription.setText(it.b);
radioButtonViewGroup2.textDescription.setVisibility(gjJ.b((CharSequence) it.b) ? 8 : 0);
radioButtonViewGroup2.holder.setOnClickListener(new LWm(this, i, r2));
radioButtonViewGroup2.divider.setVisibility(i == getItemCount() - 1 ? (byte) 8 : (byte) 0);
}
public RadioButtonGroupAdapter(List<IT> list, IeS ieS) {
this.a = list;
this.b = ieS;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
List<IT> list = this.a;
if (list == null) {
return 0;
}
return list.size();
}
public final void e(int i) {
this.c = Integer.valueOf(i);
notifyDataSetChanged();
IeS ieS = this.b;
if (ieS != null) {
this.a.get(this.c.intValue());
ieS.b(this.c.intValue());
}
}
/* loaded from: classes5.dex */
static class RadioButtonViewGroup extends RecyclerView.zJl {
@BindView
View divider;
@BindView
View holder;
@BindView
RadioButton rbOption;
@BindView
TextView textDescription;
@BindView
TextView textHighlightLabel;
@BindView
TextView textLabel;
private RadioButtonViewGroup(View view) {
super(view);
ButterKnife.c(this, view);
}
/* synthetic */ RadioButtonViewGroup(View view, byte b) {
this(view);
}
}
/* loaded from: classes5.dex */
class LWm implements View.OnClickListener {
private int c;
private RadioButtonGroupAdapter e;
private LWm(RadioButtonGroupAdapter radioButtonGroupAdapter, int i) {
this.e = radioButtonGroupAdapter;
this.c = i;
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (this.e.b != null) {
this.e.c = Integer.valueOf(this.c);
IeS ieS = this.e.b;
ieS.b(this.c);
this.e.notifyDataSetChanged();
}
}
/* synthetic */ LWm(RadioButtonGroupAdapter radioButtonGroupAdapter, int i, byte b) {
this(radioButtonGroupAdapter, i);
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ RadioButtonViewGroup onCreateViewHolder(ViewGroup viewGroup, int i) {
return new RadioButtonViewGroup(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559317, viewGroup, false), (byte) 0);
}
}