161 lines
4.7 KiB
Java
161 lines
4.7 KiB
Java
package com.scb.phone.view.custom.investment.onboarding;
|
|
|
|
import android.content.Context;
|
|
import android.content.res.TypedArray;
|
|
import android.util.AttributeSet;
|
|
import android.view.LayoutInflater;
|
|
import android.view.ViewGroup;
|
|
import android.widget.CheckBox;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.custom.investment.onboarding.CustomFundAddressDetail;
|
|
import com.scb.phone.view.custom.investment.onboarding.CustomTextViewNavigation;
|
|
import o.C15715hv;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class CustomFundAddressDetail extends LinearLayout {
|
|
private String a;
|
|
private String b;
|
|
private Sts c;
|
|
|
|
@BindView
|
|
public CheckBox checkbox1;
|
|
|
|
@BindView
|
|
public CheckBox checkbox2;
|
|
private String d;
|
|
private String e;
|
|
private String j;
|
|
|
|
@BindView
|
|
TextView labelCheckboxTitle1;
|
|
|
|
@BindView
|
|
TextView labelCheckboxTitle2;
|
|
|
|
@BindView
|
|
LinearLayout layoutCheckbox1;
|
|
|
|
@BindView
|
|
LinearLayout layoutCheckbox2;
|
|
|
|
@BindView
|
|
CustomTextViewNavigation viewCustomAddress;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public interface Sts {
|
|
void b(int i, boolean z);
|
|
|
|
void c();
|
|
}
|
|
|
|
public CustomFundAddressDetail(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomFundAddressDetail, 0, 0);
|
|
this.j = obtainStyledAttributes.getString(4);
|
|
this.b = obtainStyledAttributes.getString(2);
|
|
this.e = obtainStyledAttributes.getString(0);
|
|
this.d = obtainStyledAttributes.getString(1);
|
|
obtainStyledAttributes.recycle();
|
|
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131559277, (ViewGroup) this, true);
|
|
ButterKnife.c(this);
|
|
this.layoutCheckbox2.setVisibility(8);
|
|
this.viewCustomAddress.setOnClickDetailNavigationCompletion(new CustomTextViewNavigation.RVV(this) { // from class: o.eDm
|
|
private CustomFundAddressDetail a;
|
|
|
|
@Override // com.scb.phone.view.custom.investment.onboarding.CustomTextViewNavigation.RVV
|
|
public final void b() {
|
|
CustomFundAddressDetail.d(this.a);
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
}
|
|
});
|
|
this.viewCustomAddress.setLabelTitle(this.j);
|
|
this.viewCustomAddress.setPlaceholderText(this.b);
|
|
this.labelCheckboxTitle1.setText(this.e);
|
|
this.labelCheckboxTitle2.setText(this.d);
|
|
}
|
|
|
|
public CustomFundAddressDetail(Context context) {
|
|
super(context);
|
|
}
|
|
|
|
@OnClick
|
|
public void onCheckbox1Click() {
|
|
Sts sts = this.c;
|
|
if (sts != null) {
|
|
sts.b(1, this.checkbox1.isChecked());
|
|
}
|
|
}
|
|
|
|
@OnClick
|
|
public void onCheckbox2Click() {
|
|
Sts sts = this.c;
|
|
if (sts != null) {
|
|
sts.b(2, this.checkbox2.isChecked());
|
|
}
|
|
}
|
|
|
|
public void setCheckbox2Visibility(int i) {
|
|
this.layoutCheckbox2.setVisibility(i);
|
|
}
|
|
|
|
public void setAddressDetailTitle(String str) {
|
|
this.viewCustomAddress.setLabelTitle(str);
|
|
}
|
|
|
|
public void setPlaceholderDetailText(String str) {
|
|
this.viewCustomAddress.setPlaceholderText(str);
|
|
}
|
|
|
|
public void setDescriptionText(String str) {
|
|
this.a = str;
|
|
this.viewCustomAddress.setDescriptionText(str);
|
|
}
|
|
|
|
public void setCheckbox1Checked(boolean z, boolean z2) {
|
|
if (z2) {
|
|
this.checkbox1.setChecked(z);
|
|
}
|
|
this.checkbox2.setEnabled(!this.checkbox1.isChecked());
|
|
c();
|
|
}
|
|
|
|
public void setCheckbox2Checked(boolean z, boolean z2) {
|
|
if (z2) {
|
|
this.checkbox2.setChecked(z);
|
|
}
|
|
this.checkbox1.setEnabled(!this.checkbox2.isChecked());
|
|
c();
|
|
}
|
|
|
|
private void c() {
|
|
if (this.checkbox1.isChecked() || this.checkbox2.isChecked()) {
|
|
this.viewCustomAddress.setDescriptionText("");
|
|
this.viewCustomAddress.setPlaceholderText("");
|
|
this.viewCustomAddress.setEnableNavigationArea(false);
|
|
} else {
|
|
this.viewCustomAddress.setDescriptionText(this.a);
|
|
this.viewCustomAddress.setPlaceholderText(this.b);
|
|
this.viewCustomAddress.setEnableNavigationArea(true);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void d(CustomFundAddressDetail customFundAddressDetail) {
|
|
Sts sts = customFundAddressDetail.c;
|
|
if (sts != null) {
|
|
sts.c();
|
|
}
|
|
}
|
|
|
|
public void setOnCustomFundAddressDetailCompletion(Sts sts) {
|
|
this.c = sts;
|
|
}
|
|
}
|