198 lines
7.2 KiB
Java
198 lines
7.2 KiB
Java
|
package com.scb.phone.view.fragment.profilemanagement.promptpay;
|
||
|
|
||
|
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.CheckBox;
|
||
|
import android.widget.CompoundButton;
|
||
|
import android.widget.TextView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.activity.BaseActivity;
|
||
|
import com.scb.phone.view.activity.profilemanagement.promptpay.ManagePromptpayLandingActivity;
|
||
|
import com.scb.phone.view.activity.profilemanagement.promptpay.PromptPayTermsAndConditionsActivity;
|
||
|
import com.scb.phone.view.fragment.profilemanagement.promptpay.PromptPayTermsAndConditionsLandingFragment;
|
||
|
import o.C7815cvU;
|
||
|
import o.EnumC13954fk;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC8973dau;
|
||
|
import o.ZI;
|
||
|
import o.hXn;
|
||
|
import o.nMh;
|
||
|
import o.tNN;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class PromptPayTermsAndConditionsLandingFragment extends Hilt_PromptPayTermsAndConditionsLandingFragment implements InterfaceC8973dau.IeS {
|
||
|
|
||
|
@BindView
|
||
|
Button buttonNext;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C7815cvU presenter;
|
||
|
|
||
|
@BindView
|
||
|
CheckBox termsAndConditionsCheck;
|
||
|
|
||
|
@BindView
|
||
|
TextView termsConditionsText;
|
||
|
|
||
|
public static PromptPayTermsAndConditionsLandingFragment g() {
|
||
|
return new PromptPayTermsAndConditionsLandingFragment();
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559840, viewGroup, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
this.presenter.e((C7815cvU) this);
|
||
|
C7815cvU c7815cvU = this.presenter;
|
||
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.cvY
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
C7815cvU.c((InterfaceC8973dau.IeS) obj);
|
||
|
}
|
||
|
};
|
||
|
if (c7815cvU.f != 0) {
|
||
|
ieS.e(c7815cvU.f);
|
||
|
}
|
||
|
if (c7815cvU.f != 0) {
|
||
|
c7815cvU.f.y();
|
||
|
}
|
||
|
c7815cvU.d.d();
|
||
|
tNN tnn = c7815cvU.d;
|
||
|
tnn.d(tnn.i, new C7815cvU.RVV(c7815cvU));
|
||
|
String string = getString(R.string.terms_and_conditions_link_not_clickable_left);
|
||
|
String string2 = getString(R.string.terms_and_conditions_link_clickable);
|
||
|
String string3 = getString(R.string.terms_and_conditions_link_not_clickable_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.profilemanagement.promptpay.PromptPayTermsAndConditionsLandingFragment.1
|
||
|
private PromptPayTermsAndConditionsLandingFragment c;
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
}
|
||
|
|
||
|
@Override // android.text.style.ClickableSpan
|
||
|
public final void onClick(View view) {
|
||
|
C7815cvU c7815cvU2 = this.c.presenter;
|
||
|
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.cvV
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC8973dau.IeS) obj).d();
|
||
|
}
|
||
|
};
|
||
|
if (c7815cvU2.f != 0) {
|
||
|
ieS2.e(c7815cvU2.f);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.text.style.ClickableSpan, android.text.style.CharacterStyle
|
||
|
public final void updateDrawState(TextPaint textPaint) {
|
||
|
super.updateDrawState(textPaint);
|
||
|
textPaint.setUnderlineText(true);
|
||
|
if (this.c.getContext() != null) {
|
||
|
textPaint.setColor(nMh.getColor(this.c.getContext(), R.color.f13682131100876));
|
||
|
}
|
||
|
}
|
||
|
}, string.length(), string.length() + string2.length(), 33);
|
||
|
this.termsConditionsText.setText(spannableString);
|
||
|
this.termsConditionsText.setMovementMethod(LinkMovementMethod.getInstance());
|
||
|
this.termsConditionsText.setHighlightColor(0);
|
||
|
this.termsAndConditionsCheck.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(this) { // from class: o.fvu
|
||
|
private PromptPayTermsAndConditionsLandingFragment c;
|
||
|
|
||
|
@Override // android.widget.CompoundButton.OnCheckedChangeListener
|
||
|
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
||
|
PromptPayTermsAndConditionsLandingFragment.d(this.c, z);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
}
|
||
|
});
|
||
|
this.buttonNext.setOnClickListener(new View.OnClickListener(this) { // from class: o.fvy
|
||
|
private PromptPayTermsAndConditionsLandingFragment c;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
PromptPayTermsAndConditionsLandingFragment.e(this.c);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
}
|
||
|
});
|
||
|
hXn hxn = new hXn();
|
||
|
if (getActivity() != null) {
|
||
|
hxn.c(((BaseActivity) getActivity()).scbAnalytics, "managepromptpay_consent");
|
||
|
}
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC8973dau.IeS
|
||
|
public final void e(boolean z) {
|
||
|
this.buttonNext.setEnabled(z);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC8973dau.IeS
|
||
|
public final void d(boolean z) {
|
||
|
this.termsAndConditionsCheck.setChecked(z);
|
||
|
this.buttonNext.setEnabled(z);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC8973dau.IeS
|
||
|
public final void c() {
|
||
|
if (getActivity() != null) {
|
||
|
getActivity().onBackPressed();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC8973dau.IeS
|
||
|
public final void b() {
|
||
|
ManagePromptpayLandingActivity.d(new Object[]{getContext()}, -1175621071, 1175621071, (int) System.currentTimeMillis());
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC8973dau.IeS
|
||
|
public final void d() {
|
||
|
startActivity(PromptPayTermsAndConditionsActivity.ala_(getContext()));
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void d(PromptPayTermsAndConditionsLandingFragment promptPayTermsAndConditionsLandingFragment, final boolean z) {
|
||
|
C7815cvU c7815cvU = promptPayTermsAndConditionsLandingFragment.presenter;
|
||
|
ZI.IeS ieS = new ZI.IeS(z) { // from class: o.cvX
|
||
|
private boolean a;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
C7815cvU.b(this.a, (InterfaceC8973dau.IeS) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = z;
|
||
|
}
|
||
|
};
|
||
|
if (c7815cvU.f != 0) {
|
||
|
ieS.e(c7815cvU.f);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void e(PromptPayTermsAndConditionsLandingFragment promptPayTermsAndConditionsLandingFragment) {
|
||
|
C7815cvU c7815cvU = promptPayTermsAndConditionsLandingFragment.presenter;
|
||
|
if (c7815cvU.f != 0) {
|
||
|
c7815cvU.f.y();
|
||
|
}
|
||
|
c7815cvU.e.d(c7815cvU.e.d(EnumC13954fk.PROMPTPAY.name()), new C7815cvU.HBt(c7815cvU));
|
||
|
}
|
||
|
}
|