what-the-bank/sources/com/scb/phone/view/custom/easycash/CustomAcceptDecline.java

96 lines
3.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.easycash;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.custom.easycash.CustomAcceptDecline;
import o.C15602gz;
import o.C3172asW;
import o.IP;
import o.InterfaceC10367eCE;
import o.nMh;
/* loaded from: classes5.dex */
public class CustomAcceptDecline extends LinearLayout {
@BindView
RadioButton radioAccept;
@BindView
RadioButton radioDecline;
@BindView
RadioGroup radioGroup;
@BindView
TextView titleTextView;
@BindView
TextView tvBodyConsentView;
public CustomAcceptDecline(Context context, final IP ip, final InterfaceC10367eCE interfaceC10367eCE) {
super(context);
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131558889, (ViewGroup) this, true);
ButterKnife.c(this);
if (ip.d) {
this.titleTextView.setText(C15602gz.h(ip.j.replace("<br>", "\n")));
this.tvBodyConsentView.setText(C3172asW.qI_(ip.a.replace("&bull;", ""), 1));
} else {
this.titleTextView.setText(C15602gz.h(ip.j));
this.tvBodyConsentView.setText(C15602gz.h(ip.a));
}
String str = ip.c;
String str2 = ip.e;
this.radioAccept.setText(str);
this.radioDecline.setText(str2);
this.radioGroup.clearCheck();
this.radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener(this, interfaceC10367eCE, ip) { // from class: o.eCF
private InterfaceC10367eCE a;
private CustomAcceptDecline b;
private IP e;
@Override // android.widget.RadioGroup.OnCheckedChangeListener
public final void onCheckedChanged(RadioGroup radioGroup, int i) {
CustomAcceptDecline.c(this.b, this.a, this.e, i);
}
{
this.b = this;
this.a = interfaceC10367eCE;
this.e = ip;
}
});
b();
}
public void setAgree(boolean z) {
if (z) {
this.radioGroup.check(R.id.radio_accept);
} else {
this.radioGroup.check(R.id.radio_decline);
}
}
public final void b() {
this.radioAccept.setTextColor(nMh.getColor(getContext(), R.color.f1852131099685));
this.radioDecline.setTextColor(nMh.getColor(getContext(), R.color.f1852131099685));
this.radioAccept.setEnabled(true);
this.radioDecline.setEnabled(true);
}
public static /* synthetic */ void c(CustomAcceptDecline customAcceptDecline, InterfaceC10367eCE interfaceC10367eCE, IP ip, int i) {
if (i == R.id.radio_accept) {
interfaceC10367eCE.c(ip.b, Boolean.TRUE);
} else if (i == R.id.radio_decline) {
interfaceC10367eCE.c(ip.b, Boolean.FALSE);
}
}
}