302 lines
9.8 KiB
Java
302 lines
9.8 KiB
Java
package com.scb.phone.view.fragment.ndid;
|
|
|
|
import android.content.ActivityNotFoundException;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.net.Uri;
|
|
import android.os.Bundle;
|
|
import android.text.SpannableString;
|
|
import android.text.TextPaint;
|
|
import android.text.method.LinkMovementMethod;
|
|
import android.text.style.ClickableSpan;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.Button;
|
|
import android.widget.TextView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnCheckedChanged;
|
|
import butterknife.OnClick;
|
|
import com.huawei.hms.support.api.entity.common.CommonConstant;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.BaseActivity;
|
|
import com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle;
|
|
import java.util.List;
|
|
import o.C4104bQ;
|
|
import o.IFW;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC9487dkf;
|
|
import o.MYp;
|
|
import o.ZI;
|
|
import o.bZS;
|
|
import o.guQ;
|
|
import o.nMh;
|
|
import o.yAM;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class NdidSelectIdpFragment extends Hilt_NdidSelectIdpFragment implements InterfaceC9487dkf {
|
|
|
|
@BindView
|
|
TextView agreeTermsConditionTextView;
|
|
private IFW c = new IFW();
|
|
private Sts d;
|
|
|
|
@BindView
|
|
CustomSpinnerWithTitle idpSpinner;
|
|
|
|
@BindView
|
|
Button nextButton;
|
|
|
|
@InterfaceC13391fZD
|
|
public bZS presenter;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public interface Sts {
|
|
void b(List<String> list);
|
|
}
|
|
|
|
public static NdidSelectIdpFragment j() {
|
|
return new NdidSelectIdpFragment();
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // com.scb.phone.view.fragment.ndid.Hilt_NdidSelectIdpFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
|
|
public void onAttach(Context context) {
|
|
super.onAttach(context);
|
|
if (getParentFragment() instanceof Sts) {
|
|
this.d = (Sts) getParentFragment();
|
|
} else {
|
|
if (context instanceof Sts) {
|
|
this.d = (Sts) context;
|
|
return;
|
|
}
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(context.toString());
|
|
sb.append(" must implement IdpConfirmedListener");
|
|
throw new ClassCastException(sb.toString());
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public void onViewCreated(View view, Bundle bundle) {
|
|
super.onViewCreated(view, bundle);
|
|
this.c.d("feature", g());
|
|
IFW ifw = this.c;
|
|
if (getActivity() != null) {
|
|
ifw.c(((BaseActivity) getActivity()).scbAnalytics, "ndid_rp_verifying_partner");
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.2131559784, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
this.presenter.e((bZS) this);
|
|
final bZS bzs = this.presenter;
|
|
bzs.b = bzs.h.c.g();
|
|
ZI.IeS ieS = new ZI.IeS(bzs) { // from class: o.bZX
|
|
private bZS c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
bZS.a(this.c, (InterfaceC9487dkf) obj);
|
|
}
|
|
|
|
{
|
|
this.c = bzs;
|
|
}
|
|
};
|
|
if (bzs.f != 0) {
|
|
ieS.e(bzs.f);
|
|
}
|
|
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bZV
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9487dkf) obj).d();
|
|
}
|
|
};
|
|
if (bzs.f != 0) {
|
|
ieS2.e(bzs.f);
|
|
}
|
|
return inflate;
|
|
}
|
|
|
|
@Override // o.InterfaceC9487dkf
|
|
public final void d() {
|
|
String string = getString(R.string.ndid_select_idp_terms_cond_message_left);
|
|
String string2 = getString(R.string.ndid_select_idp_terms_cond_message_clickable);
|
|
String string3 = getString(R.string.ndid_select_idp_terms_cond_message_right);
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(string);
|
|
sb.append(string2);
|
|
sb.append(string3);
|
|
SpannableString spannableString = new SpannableString(sb.toString());
|
|
spannableString.setSpan(new ClickableSpan(this) { // from class: com.scb.phone.view.fragment.ndid.NdidSelectIdpFragment.2
|
|
private NdidSelectIdpFragment e;
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
|
|
@Override // android.text.style.ClickableSpan
|
|
public final void onClick(View view) {
|
|
bZS bzs = this.e.presenter;
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.bZY
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9487dkf) obj).e();
|
|
}
|
|
};
|
|
if (bzs.f != 0) {
|
|
ieS.e(bzs.f);
|
|
}
|
|
}
|
|
|
|
@Override // android.text.style.ClickableSpan, android.text.style.CharacterStyle
|
|
public final void updateDrawState(TextPaint textPaint) {
|
|
super.updateDrawState(textPaint);
|
|
textPaint.setUnderlineText(true);
|
|
if (this.e.getContext() != null) {
|
|
textPaint.setColor(nMh.getColor(this.e.getContext(), R.color.f13682131100876));
|
|
}
|
|
}
|
|
}, string.length(), string.length() + string2.length(), 33);
|
|
this.agreeTermsConditionTextView.setText(spannableString);
|
|
this.agreeTermsConditionTextView.setMovementMethod(LinkMovementMethod.getInstance());
|
|
this.agreeTermsConditionTextView.setHighlightColor(0);
|
|
}
|
|
|
|
@Override // o.InterfaceC9487dkf
|
|
public final void c(List<String> list) {
|
|
this.idpSpinner.b();
|
|
this.idpSpinner.setItems(list, true, false);
|
|
this.idpSpinner.setMandatory(true);
|
|
this.idpSpinner.setOnCustomSpinnerWithTitleCompletion(new CustomSpinnerWithTitle.LWm(this) { // from class: com.scb.phone.view.fragment.ndid.NdidSelectIdpFragment.3
|
|
private NdidSelectIdpFragment a;
|
|
|
|
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
|
|
public final void bn_() {
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
|
|
public final void bo_() {
|
|
if (((MYp) this.a.idpSpinner.c.e()).c.getSelectedItemPosition() > 0) {
|
|
final bZS bzs = this.a.presenter;
|
|
bzs.c = bzs.b.get(((MYp) this.a.idpSpinner.c.e()).c.getSelectedItemPosition() - 1);
|
|
ZI.IeS ieS = new ZI.IeS(bzs) { // from class: o.bZZ
|
|
private bZS a;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
bZS bzs2 = this.a;
|
|
((InterfaceC9487dkf) obj).a(r1.d && r1.e);
|
|
}
|
|
|
|
{
|
|
this.a = bzs;
|
|
}
|
|
};
|
|
if (bzs.f != 0) {
|
|
ieS.e(bzs.f);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // o.InterfaceC9487dkf
|
|
public final void a(boolean z) {
|
|
this.nextButton.setEnabled(z);
|
|
}
|
|
|
|
@OnCheckedChanged
|
|
public void onConsentChecked(final boolean z) {
|
|
final bZS bzs = this.presenter;
|
|
bzs.d = z;
|
|
ZI.IeS ieS = new ZI.IeS(bzs, z) { // from class: o.bZQ
|
|
private bZS b;
|
|
private boolean c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
bZS bzs2 = this.b;
|
|
boolean z2 = this.c;
|
|
((InterfaceC9487dkf) obj).a(r1 && r0.e && r0.c != null);
|
|
}
|
|
|
|
{
|
|
this.b = bzs;
|
|
this.c = z;
|
|
}
|
|
};
|
|
if (bzs.f != 0) {
|
|
ieS.e(bzs.f);
|
|
}
|
|
}
|
|
|
|
@OnCheckedChanged
|
|
public void onTermsCondChecked(final boolean z) {
|
|
final bZS bzs = this.presenter;
|
|
bzs.e = z;
|
|
ZI.IeS ieS = new ZI.IeS(bzs, z) { // from class: o.bZW
|
|
private bZS a;
|
|
private boolean c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
bZS bzs2 = this.a;
|
|
boolean z2 = this.c;
|
|
((InterfaceC9487dkf) obj).a(r1 && r0.d && r0.c != null);
|
|
}
|
|
|
|
{
|
|
this.a = bzs;
|
|
this.c = z;
|
|
}
|
|
};
|
|
if (bzs.f != 0) {
|
|
ieS.e(bzs.f);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9487dkf
|
|
public final void a(List<String> list) {
|
|
this.d.b(list);
|
|
}
|
|
|
|
@Override // o.InterfaceC9487dkf
|
|
public final void e() {
|
|
try {
|
|
startActivity(new Intent(CommonConstant.ACTION.HWID_SCHEME_URL).setData(Uri.parse("th".equals(W()) ? "https://info.scb.co.th/scbeasy/NDID/NDID_TC_thai.html" : "https://info.scb.co.th/scbeasy/NDID/NDID_TC_eng.html")));
|
|
} catch (ActivityNotFoundException e) {
|
|
guQ.e(e);
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroy() {
|
|
this.presenter.w_();
|
|
super.onDestroy();
|
|
}
|
|
|
|
@OnClick
|
|
public void onNextButtonClick() {
|
|
bZS bzs = this.presenter;
|
|
if (bzs.f != 0) {
|
|
bzs.f.y();
|
|
}
|
|
C4104bQ c4104bQ = new C4104bQ(bzs.c.e, bzs.c.a, bzs.c.b.d, bzs.c.b.b, String.valueOf(bzs.c.c), String.valueOf(bzs.c.d));
|
|
yAM yam = bzs.a;
|
|
yam.d(yam.e(c4104bQ), new bZS.AnonymousClass1(bzs));
|
|
}
|
|
|
|
protected String g() {
|
|
return "open_account";
|
|
}
|
|
}
|