799 lines
30 KiB
Java
799 lines
30 KiB
Java
package com.scb.phone.view.fragment.transferandpay.transfer;
|
|
|
|
import android.content.Context;
|
|
import android.content.DialogInterface;
|
|
import android.content.Intent;
|
|
import android.content.IntentFilter;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.os.Bundle;
|
|
import android.text.TextUtils;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.EditText;
|
|
import android.widget.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.google.android.material.textfield.TextInputLayout;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.BaseActivity;
|
|
import com.scb.phone.view.activity.PreLoadCheckActivity;
|
|
import com.scb.phone.view.activity.scheduledtransaction.ScheduleLandingActivity;
|
|
import com.scb.phone.view.activity.transferandpay.transfer.TransferGiftingInputActivity;
|
|
import com.scb.phone.view.activity.transferandpay.transfer.TransferReviewActivity;
|
|
import com.scb.phone.view.custom.common.AmountEditText;
|
|
import com.scb.phone.view.custom.common.CustomGiftingView;
|
|
import com.scb.phone.view.custom.common.CustomScheduleView;
|
|
import com.scb.phone.view.custom.common.DefaultButton;
|
|
import com.scb.phone.view.custom.common.NoteEditText;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.transfer.TransferInputAmountFragment;
|
|
import java.text.NumberFormat;
|
|
import java.util.concurrent.TimeUnit;
|
|
import o.AbstractC1237Yr;
|
|
import o.AbstractC13163fSk;
|
|
import o.AbstractViewOnClickListenerC10455eEp;
|
|
import o.C1019Twi;
|
|
import o.C10457eEr;
|
|
import o.C1189Xo;
|
|
import o.C1249Yx;
|
|
import o.C12891fKc;
|
|
import o.C13417fZt;
|
|
import o.C14536fv;
|
|
import o.C14589fw;
|
|
import o.C15602gz;
|
|
import o.C15833ivU;
|
|
import o.C6583cXR;
|
|
import o.EnumC8951daY;
|
|
import o.InterfaceC12851fIz;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC9010dbe;
|
|
import o.Lqn;
|
|
import o.NZv;
|
|
import o.PWw;
|
|
import o.VN;
|
|
import o.WmB;
|
|
import o.YA;
|
|
import o.YF;
|
|
import o.ZGL;
|
|
import o.ZI;
|
|
import o.cVH;
|
|
import o.cXG;
|
|
import o.fLM;
|
|
import o.fRR;
|
|
import o.fSJ;
|
|
import o.fSQ;
|
|
import o.gjJ;
|
|
import o.glR;
|
|
import o.nMh;
|
|
import o.qhK;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class TransferInputAmountFragment extends Hilt_TransferInputAmountFragment implements InterfaceC9010dbe.uqm, InterfaceC12851fIz {
|
|
|
|
@BindView
|
|
protected DefaultButton buttonReview;
|
|
private double c;
|
|
|
|
@BindView
|
|
protected CustomGiftingView customGiftingView;
|
|
|
|
@BindView
|
|
protected CustomScheduleView customScheduleView;
|
|
private String d;
|
|
|
|
@BindView
|
|
protected EditText editAccountNumber;
|
|
|
|
@BindView
|
|
protected AmountEditText editAmount;
|
|
|
|
@BindView
|
|
protected ImageView editImageView;
|
|
private String f;
|
|
private String g;
|
|
|
|
@BindView
|
|
protected LinearLayout giftLayout;
|
|
private boolean h;
|
|
private Drawable i;
|
|
|
|
@BindView
|
|
protected ImageView imageIcon;
|
|
|
|
@BindView
|
|
TextInputLayout inputLayout;
|
|
private fSJ j;
|
|
private VN l;
|
|
private WmB m;
|
|
|
|
@BindView
|
|
protected NoteEditText noteEditText;
|
|
|
|
@BindView
|
|
protected LinearLayout noteLayout;
|
|
|
|
/* renamed from: o, reason: collision with root package name */
|
|
private fSJ f8083o;
|
|
|
|
@InterfaceC13391fZD
|
|
public cVH presenter;
|
|
|
|
@BindView
|
|
protected TextView remainingLimit;
|
|
|
|
@BindView
|
|
protected TextView remainingLimitError;
|
|
|
|
@BindView
|
|
protected LinearLayout remainingLimitLinearLayout;
|
|
|
|
@BindView
|
|
protected View scheduleLine;
|
|
|
|
@BindView
|
|
protected TextView textAccountNumber;
|
|
|
|
@BindView
|
|
protected TextView textRemainingLimit;
|
|
|
|
@BindView
|
|
protected TextView textTitle;
|
|
|
|
@BindView
|
|
protected ViewGroup viewGroupAccountNumber;
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, o.InterfaceC9620dnF.IeS
|
|
public final void aI_() {
|
|
while (true) {
|
|
}
|
|
}
|
|
|
|
public static TransferInputAmountFragment e(AbstractC1237Yr abstractC1237Yr, String str, ZGL zgl, double d, String str2) {
|
|
Bundle bundle = new Bundle();
|
|
bundle.putParcelable("com.scb.phone.EXTRA_TRANSFER_TARGET_DATA", abstractC1237Yr);
|
|
bundle.putString("com.scb.phone.EXTRA_ACCOUNT_NUMBER", str);
|
|
bundle.putSerializable("com.scb.phone.EXTRA_ACCOUNT_TYPE", zgl);
|
|
bundle.putDouble("com.scb.phone.EXTRA_ACCOUNT_BALANCE", d);
|
|
bundle.putString("source", str2);
|
|
TransferInputAmountFragment transferInputAmountFragment = new TransferInputAmountFragment();
|
|
transferInputAmountFragment.setArguments(bundle);
|
|
return transferInputAmountFragment;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.2131559968, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
this.editAmount.setOnPasteListener(new AmountEditText.HBt());
|
|
this.presenter.e((cVH) this);
|
|
this.i = nMh.getDrawable(getContext(), R.drawable.bankicon_place_holder);
|
|
this.j = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_REFRESH_SOURCE_ACCOUNTS")).subscribe(new fSQ(this) { // from class: o.fGU
|
|
private TransferInputAmountFragment d;
|
|
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
TransferInputAmountFragment.a(this.d);
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
}, new fSQ() { // from class: o.fGY
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
guQ.a((Throwable) obj);
|
|
}
|
|
});
|
|
this.f8083o = AbstractC13163fSk.interval(1L, TimeUnit.SECONDS).observeOn(fRR.e()).subscribeOn(C13417fZt.c()).subscribe(new fSQ(this) { // from class: o.fHe
|
|
private TransferInputAmountFragment d;
|
|
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
TransferInputAmountFragment.e(this.d);
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
}, new fSQ() { // from class: o.fGY
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
guQ.a((Throwable) obj);
|
|
}
|
|
});
|
|
Bundle arguments = getArguments();
|
|
if (arguments != null) {
|
|
final cVH cvh = this.presenter;
|
|
AbstractC1237Yr abstractC1237Yr = (AbstractC1237Yr) arguments.getParcelable("com.scb.phone.EXTRA_TRANSFER_TARGET_DATA");
|
|
String string = arguments.getString("com.scb.phone.EXTRA_ACCOUNT_NUMBER");
|
|
ZGL zgl = (ZGL) arguments.getSerializable("com.scb.phone.EXTRA_ACCOUNT_TYPE");
|
|
final double d = arguments.getDouble("com.scb.phone.EXTRA_ACCOUNT_BALANCE");
|
|
cvh.g = abstractC1237Yr;
|
|
cvh.l = string;
|
|
cvh.f8627o = zgl;
|
|
ZI.IeS ieS = new ZI.IeS(d) { // from class: o.cVS
|
|
private double d;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9010dbe.uqm) obj).e(this.d);
|
|
}
|
|
|
|
{
|
|
this.d = d;
|
|
}
|
|
};
|
|
if (cvh.f != 0) {
|
|
ieS.e(cvh.f);
|
|
}
|
|
ZI.IeS ieS2 = new ZI.IeS(cvh) { // from class: o.cVY
|
|
private cVH c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9010dbe.uqm) obj).a(this.c.g);
|
|
}
|
|
|
|
{
|
|
this.c = cvh;
|
|
}
|
|
};
|
|
if (cvh.f != 0) {
|
|
ieS2.e(cvh.f);
|
|
}
|
|
}
|
|
this.m = new WmB();
|
|
String Q = Q();
|
|
this.d = Q;
|
|
this.m.e(Q);
|
|
this.m.d(this.presenter.g.h.toString());
|
|
WmB wmB = this.m;
|
|
if (getActivity() != null) {
|
|
wmB.c(((BaseActivity) getActivity()).scbAnalytics, "transfer_input");
|
|
}
|
|
final cVH cvh2 = this.presenter;
|
|
if (cvh2.d != null) {
|
|
ZI.IeS ieS3 = new ZI.IeS(cvh2) { // from class: o.cVJ
|
|
private cVH a;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9010dbe.uqm) obj).d(this.a.d);
|
|
}
|
|
|
|
{
|
|
this.a = cvh2;
|
|
}
|
|
};
|
|
if (cvh2.f != 0) {
|
|
ieS3.e(cvh2.f);
|
|
}
|
|
} else if (cvh2.a != null) {
|
|
ZI.IeS ieS4 = new ZI.IeS(cvh2) { // from class: o.cVN
|
|
private cVH c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9010dbe.uqm) obj).a(this.c.a);
|
|
}
|
|
|
|
{
|
|
this.c = cvh2;
|
|
}
|
|
};
|
|
if (cvh2.f != 0) {
|
|
ieS4.e(cvh2.f);
|
|
}
|
|
}
|
|
cVH cvh3 = this.presenter;
|
|
if (cvh3.f != 0) {
|
|
cvh3.f.v();
|
|
}
|
|
cvh3.i.b(new cVH.AnonymousClass4(cvh3), new C15833ivU.RVV("TRANSFER", cvh3.g.h.name()), cvh3.e);
|
|
this.presenter.c(getActivity() instanceof PreLoadCheckActivity ? ((PreLoadCheckActivity) getActivity()).al() : null);
|
|
this.buttonReview.setOnClickListener(new AbstractViewOnClickListenerC10455eEp(this) { // from class: com.scb.phone.view.fragment.transferandpay.transfer.TransferInputAmountFragment.1
|
|
private TransferInputAmountFragment e;
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // o.AbstractViewOnClickListenerC10455eEp
|
|
public final void a() {
|
|
cVH cvh4 = this.e.presenter;
|
|
String obj = this.e.noteEditText.mNoteEditText.getText().toString();
|
|
if (cvh4.f != 0) {
|
|
if (TextUtils.isEmpty(obj) || ((Boolean) C6583cXR.c(new Object[]{obj}, -1032102340, 1032102340, (int) System.currentTimeMillis())).booleanValue()) {
|
|
cVH cvh5 = this.e.presenter;
|
|
boolean z = cvh5.b;
|
|
if (cvh5.l != null) {
|
|
TransferInputAmountFragment transferInputAmountFragment = this.e;
|
|
if (transferInputAmountFragment.getActivity() != null) {
|
|
((BaseActivity) transferInputAmountFragment.getActivity()).scbAnalytics.c("transfer_input_button");
|
|
}
|
|
this.e.aN_();
|
|
this.e.y();
|
|
String b = TransferInputAmountFragment.b(this.e);
|
|
cVH cvh6 = this.e.presenter;
|
|
double d2 = this.e.c;
|
|
String obj2 = this.e.noteEditText.mNoteEditText.getText().toString();
|
|
VN vn = this.e.l;
|
|
if (cvh6.c) {
|
|
return;
|
|
}
|
|
cvh6.c = true;
|
|
AbstractC1237Yr abstractC1237Yr2 = cvh6.g;
|
|
if (abstractC1237Yr2 instanceof YA) {
|
|
YA ya = (YA) abstractC1237Yr2;
|
|
String str = abstractC1237Yr2.c;
|
|
Lqn lqn = cvh6.a;
|
|
if (lqn == null) {
|
|
if (!TextUtils.isEmpty(str)) {
|
|
b = str;
|
|
} else if (b == null) {
|
|
b = "";
|
|
}
|
|
} else {
|
|
b = lqn.d.e;
|
|
}
|
|
String str2 = ya.d.equals("000") ? "014" : ya.d;
|
|
cvh6.n = ya.h;
|
|
C14536fv c14536fv = new C14536fv();
|
|
c14536fv.h = C6583cXR.d(cvh6.n);
|
|
c14536fv.a = cvh6.l;
|
|
c14536fv.d = cvh6.f8627o.d();
|
|
c14536fv.c = b;
|
|
c14536fv.e = str2;
|
|
c14536fv.b = C15602gz.e(d2);
|
|
c14536fv.j = vn != null ? new NZv(vn.c, cXG.a(vn.b), cXG.a(vn.d), vn.e) : null;
|
|
c14536fv.g.b = gjJ.b((CharSequence) obj2) ? 0 : obj2;
|
|
cvh6.m.d(cvh6.m.a.c(c14536fv), new cVH.RVV(cvh6, c14536fv, ya.a, ya.e, str2, obj2, vn));
|
|
return;
|
|
}
|
|
if (abstractC1237Yr2 instanceof YF) {
|
|
YF yf = (YF) abstractC1237Yr2;
|
|
qhK qhk = yf.h;
|
|
String str3 = cvh6.l;
|
|
ZGL zgl2 = cvh6.f8627o;
|
|
PWw pWw = yf.j;
|
|
String str4 = yf.d;
|
|
String str5 = yf.a;
|
|
cvh6.n = qhk;
|
|
C14589fw c14589fw = new C14589fw();
|
|
c14589fw.l = C6583cXR.d(qhK.PROMPTPAY);
|
|
c14589fw.b = str3;
|
|
c14589fw.a = zgl2.d();
|
|
c14589fw.h = (String) C6583cXR.c(new Object[]{pWw}, 817056545, -817056542, (int) System.currentTimeMillis());
|
|
c14589fw.j = str4;
|
|
c14589fw.c = C15602gz.e(d2);
|
|
c14589fw.e.b = gjJ.b((CharSequence) obj2) ? 0 : obj2;
|
|
C1019Twi c1019Twi = cvh6.d;
|
|
if (c1019Twi != null && !TextUtils.isEmpty(c1019Twi.A)) {
|
|
c14589fw.i = cvh6.d.A;
|
|
}
|
|
cvh6.m.d(cvh6.m.a.c(c14589fw), new cVH.IeS(cvh6, pWw, c14589fw, str5, obj2));
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
ZI.IeS ieS5 = new ZI.IeS() { // from class: o.cVF
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj3) {
|
|
((InterfaceC9010dbe.uqm) obj3).e();
|
|
}
|
|
};
|
|
if (cvh4.f != 0) {
|
|
ieS5.e(cvh4.f);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
return inflate;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public void onResume() {
|
|
super.onResume();
|
|
cVH cvh = this.presenter;
|
|
if (cvh.c || cvh.f == 0) {
|
|
return;
|
|
}
|
|
cvh.f.ar_();
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroy() {
|
|
this.presenter.w_();
|
|
if (((BaseFragment) this).b != null && !((BaseFragment) this).b.isDisposed()) {
|
|
((BaseFragment) this).b.dispose();
|
|
}
|
|
fSJ fsj = this.j;
|
|
if (fsj != null && !fsj.isDisposed()) {
|
|
this.j.dispose();
|
|
}
|
|
fSJ fsj2 = this.f8083o;
|
|
if (fsj2 != null && !fsj2.isDisposed()) {
|
|
this.f8083o.dispose();
|
|
}
|
|
this.m = null;
|
|
super.onDestroy();
|
|
}
|
|
|
|
@OnClick
|
|
public void navigateBack() {
|
|
C10457eEr.aqd_(this, new Intent("com.scb.phone/BROADCAST_TRANSFER_BACK_STEP"));
|
|
}
|
|
|
|
@OnClick
|
|
public void onGiftingClick() {
|
|
String obj = this.viewGroupAccountNumber.getVisibility() == 0 ? this.editAccountNumber.getText().toString() : null;
|
|
cVH cvh = this.presenter;
|
|
double d = this.c;
|
|
C1019Twi c1019Twi = cvh.d;
|
|
String str = c1019Twi != null ? c1019Twi.u : null;
|
|
AbstractC1237Yr abstractC1237Yr = cvh.g;
|
|
if (!(abstractC1237Yr instanceof YA)) {
|
|
if (abstractC1237Yr instanceof YF) {
|
|
final C1249Yx c1249Yx = new C1249Yx(cvh.g.h, cvh.l, null, ((YF) cvh.g).j, ((YF) cvh.g).d, null, str, d);
|
|
ZI.IeS ieS = new ZI.IeS(c1249Yx) { // from class: o.cVI
|
|
private C1249Yx a;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj2) {
|
|
((InterfaceC9010dbe.uqm) obj2).e(this.a);
|
|
}
|
|
|
|
{
|
|
this.a = c1249Yx;
|
|
}
|
|
};
|
|
if (cvh.f != 0) {
|
|
ieS.e(cvh.f);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
final C1249Yx c1249Yx2 = new C1249Yx(cvh.g.h, cvh.l, obj, null, null, ((YA) cvh.g).d, str, d);
|
|
ZI.IeS ieS2 = new ZI.IeS(c1249Yx2) { // from class: o.cVI
|
|
private C1249Yx a;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj2) {
|
|
((InterfaceC9010dbe.uqm) obj2).e(this.a);
|
|
}
|
|
|
|
{
|
|
this.a = c1249Yx2;
|
|
}
|
|
};
|
|
if (cvh.f != 0) {
|
|
ieS2.e(cvh.f);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void d(C1189Xo c1189Xo, qhK qhk) {
|
|
aN_();
|
|
ar_();
|
|
Intent intent = new Intent(getContext(), (Class<?>) TransferReviewActivity.class);
|
|
intent.putExtra("com.scb.phone.EXTRA_REVIEW", c1189Xo);
|
|
intent.putExtra("com.scb.phone.EXTRA_TRANSFER_TYPE", qhk);
|
|
intent.putExtra("source", this.d);
|
|
intent.putExtra("subtype", this.presenter.g.h.toString());
|
|
startActivity(intent);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void c(String str) {
|
|
b(true);
|
|
this.remainingLimit.setText(str);
|
|
this.f = str;
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void a(Lqn lqn) {
|
|
this.editImageView.setVisibility(8);
|
|
this.editAccountNumber.setText(lqn.d.e);
|
|
this.editAccountNumber.setVisibility(8);
|
|
this.viewGroupAccountNumber.setVisibility(8);
|
|
this.textTitle.setText(C6583cXR.b(lqn.d.e, false));
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void e() {
|
|
this.noteEditText.d();
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, o.InterfaceC6638cYp
|
|
public final void aq_() {
|
|
super.aq_();
|
|
this.remainingLimitLinearLayout.setVisibility(0);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void f() {
|
|
b(false);
|
|
}
|
|
|
|
private void b(boolean z) {
|
|
this.remainingLimitError.setVisibility(z ? 8 : 0);
|
|
this.textRemainingLimit.setVisibility(z ? 0 : 8);
|
|
this.remainingLimit.setVisibility(z ? 0 : 8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void a(AbstractC1237Yr abstractC1237Yr) {
|
|
this.textTitle.setText(abstractC1237Yr.i);
|
|
String str = abstractC1237Yr.b;
|
|
this.textAccountNumber.setText(str);
|
|
if (abstractC1237Yr instanceof YA) {
|
|
boolean z = !TextUtils.isEmpty(str);
|
|
this.textAccountNumber.setVisibility(z ? 0 : 8);
|
|
this.viewGroupAccountNumber.setVisibility(z ? 8 : 0);
|
|
} else if (abstractC1237Yr instanceof YF) {
|
|
this.textAccountNumber.setVisibility(TextUtils.isEmpty(str) ? 8 : 0);
|
|
this.viewGroupAccountNumber.setVisibility(8);
|
|
}
|
|
Context context = getContext();
|
|
C12891fKc.azg_(context, this.i, this.imageIcon, abstractC1237Yr.e, context.getResources().getDimensionPixelOffset(R.dimen.f15222131165286), nMh.getColor(context, R.color.f3412131099849));
|
|
this.remainingLimit.setText(abstractC1237Yr.a);
|
|
this.buttonReview.setButtonEnabled(false);
|
|
this.giftLayout.setVisibility(0);
|
|
this.customGiftingView.setLayoutEnabled(false);
|
|
boolean z2 = abstractC1237Yr instanceof YF;
|
|
this.h = z2;
|
|
if (z2) {
|
|
this.customScheduleView.setVisibility(8);
|
|
this.scheduleLine.setVisibility(8);
|
|
}
|
|
this.customScheduleView.setOnEditClickListener(this);
|
|
if (this.h) {
|
|
AmountEditText amountEditText = this.editAmount;
|
|
amountEditText.setCurrencyFormattingTextWatcher(new fLM(amountEditText, this.inputLayout, 9.9999999999E8d, 0.0d, getResources().getString(R.string.error_limit), getResources().getString(R.string.not_enough_funds_on_selected_account)));
|
|
} else {
|
|
fLM flm = this.editAmount.a;
|
|
if (flm != null) {
|
|
flm.a(Double.MAX_VALUE);
|
|
}
|
|
}
|
|
this.editAmount.setOnAmountChangeListener(new AmountEditText.RVV(this) { // from class: com.scb.phone.view.fragment.transferandpay.transfer.TransferInputAmountFragment.4
|
|
private TransferInputAmountFragment e;
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
|
|
public final void b(double d) {
|
|
this.e.c = d;
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
|
|
public final void a() {
|
|
this.e.aN_();
|
|
}
|
|
});
|
|
this.editAmount.setOnFocusChangeListener(new View.OnFocusChangeListener(this) { // from class: o.fHb
|
|
private TransferInputAmountFragment b;
|
|
|
|
@Override // android.view.View.OnFocusChangeListener
|
|
public final void onFocusChange(View view, boolean z3) {
|
|
TransferInputAmountFragment.b(this.b, z3);
|
|
}
|
|
|
|
{
|
|
this.b = this;
|
|
}
|
|
});
|
|
this.editAmount.setHandleDismissKeyboard(new AmountEditText.LWm(this) { // from class: o.fHd
|
|
private TransferInputAmountFragment d;
|
|
|
|
@Override // com.scb.phone.view.custom.common.AmountEditText.LWm
|
|
public final void d() {
|
|
this.d.aN_();
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void b() {
|
|
navigateBack();
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void e(double d) {
|
|
if (this.l == null) {
|
|
this.editAmount.setAvailableBalanceCurrencyFormattingTextWatcher(d);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void g() {
|
|
this.buttonReview.setButtonEnabled(!r0.isEnabled());
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void c() {
|
|
this.customGiftingView.setLayoutEnabled(true);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void d() {
|
|
this.customGiftingView.setLayoutEnabled(false);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void a() {
|
|
this.giftLayout.setVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void e(C1249Yx c1249Yx) {
|
|
TransferGiftingInputActivity.d(getActivity(), c1249Yx);
|
|
}
|
|
|
|
@Override // o.InterfaceC12851fIz
|
|
public final void r() {
|
|
startActivityForResult(new Intent(getActivity(), (Class<?>) ScheduleLandingActivity.class), 100);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onActivityResult(int i, int i2, Intent intent) {
|
|
super.onActivityResult(i, i2, intent);
|
|
if (i == 100) {
|
|
if (i2 != -1) {
|
|
if (i2 == 1) {
|
|
this.textRemainingLimit.setText(getString(R.string.transfer_remaining_limit));
|
|
this.remainingLimit.setText(this.f);
|
|
this.customScheduleView.d();
|
|
this.noteLayout.setVisibility(0);
|
|
this.l = null;
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
this.l = (VN) intent.getParcelableExtra("SCHEDULE_DETAIL");
|
|
if (this.noteLayout.getVisibility() == 0) {
|
|
this.noteLayout.setVisibility(8);
|
|
if (!this.noteEditText.mNoteEditText.getText().toString().isEmpty()) {
|
|
FragmentActivity activity = getActivity();
|
|
String string = getString(R.string.topup_input_010);
|
|
EnumC8951daY enumC8951daY = EnumC8951daY.ERROR;
|
|
if (getActivity() != null) {
|
|
BaseActivity.a(new Object[]{(BaseActivity) getActivity(), activity, Integer.valueOf(R.id.container), string, enumC8951daY}, 855668825, -855668822, R.id.container);
|
|
}
|
|
this.noteEditText.mNoteEditText.setText("");
|
|
}
|
|
}
|
|
fLM flm = this.editAmount.a;
|
|
if (flm != null) {
|
|
flm.a(Double.MAX_VALUE);
|
|
}
|
|
this.textRemainingLimit.setText(getString(R.string.schedule_transfer_limit));
|
|
this.remainingLimit.setText(this.g);
|
|
this.customScheduleView.setScheduleView(this.l, true);
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, android.content.DialogInterface.OnDismissListener
|
|
public void onDismiss(DialogInterface dialogInterface) {
|
|
super.onDismiss(dialogInterface);
|
|
this.presenter.b = false;
|
|
}
|
|
|
|
public static /* synthetic */ void a(TransferInputAmountFragment transferInputAmountFragment) {
|
|
cVH cvh = transferInputAmountFragment.presenter;
|
|
cvh.l = null;
|
|
cvh.f8627o = null;
|
|
transferInputAmountFragment.buttonReview.setButtonEnabled(false);
|
|
transferInputAmountFragment.giftLayout.setVisibility(0);
|
|
transferInputAmountFragment.customGiftingView.setLayoutEnabled(false);
|
|
transferInputAmountFragment.presenter.c(transferInputAmountFragment.getActivity() instanceof PreLoadCheckActivity ? ((PreLoadCheckActivity) transferInputAmountFragment.getActivity()).al() : null);
|
|
}
|
|
|
|
public static /* synthetic */ void b(TransferInputAmountFragment transferInputAmountFragment, boolean z) {
|
|
if (z || !C6583cXR.q(transferInputAmountFragment.editAmount.getText().toString())) {
|
|
return;
|
|
}
|
|
transferInputAmountFragment.editAmount.setText("");
|
|
}
|
|
|
|
public static /* synthetic */ void e(TransferInputAmountFragment transferInputAmountFragment) {
|
|
String str;
|
|
cVH cvh = transferInputAmountFragment.presenter;
|
|
boolean z = !transferInputAmountFragment.inputLayout.f6485o.c;
|
|
String obj = transferInputAmountFragment.editAmount.getText().toString();
|
|
boolean isEnabled = transferInputAmountFragment.buttonReview.isEnabled();
|
|
if (cvh.f != 0) {
|
|
if (isEnabled != (z && (str = cvh.l) != null && !str.isEmpty() && cVH.d(obj))) {
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.cVR
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj2) {
|
|
((InterfaceC9010dbe.uqm) obj2).g();
|
|
}
|
|
};
|
|
if (cvh.f != 0) {
|
|
ieS.e(cvh.f);
|
|
}
|
|
}
|
|
}
|
|
cVH cvh2 = transferInputAmountFragment.presenter;
|
|
String obj2 = transferInputAmountFragment.viewGroupAccountNumber.getVisibility() == 0 ? transferInputAmountFragment.editAccountNumber.getText().toString() : null;
|
|
String obj3 = transferInputAmountFragment.editAmount.getText().toString();
|
|
VN vn = transferInputAmountFragment.l;
|
|
if ((cvh2.g instanceof YA) && cvh2.f != 0 && "014".equals(((YA) cvh2.g).d) && vn == null && cVH.d(obj3) && cVH.c(obj2)) {
|
|
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.cVQ
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj4) {
|
|
((InterfaceC9010dbe.uqm) obj4).c();
|
|
}
|
|
};
|
|
if (cvh2.f != 0) {
|
|
ieS2.e(cvh2.f);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if ((cvh2.g instanceof YF) && cvh2.f != 0 && cVH.d(obj3) && cVH.c(((YF) cvh2.g).d)) {
|
|
ZI.IeS ieS3 = new ZI.IeS() { // from class: o.cVQ
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj4) {
|
|
((InterfaceC9010dbe.uqm) obj4).c();
|
|
}
|
|
};
|
|
if (cvh2.f != 0) {
|
|
ieS3.e(cvh2.f);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
ZI.IeS ieS4 = new ZI.IeS() { // from class: o.cVP
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj4) {
|
|
((InterfaceC9010dbe.uqm) obj4).d();
|
|
}
|
|
};
|
|
if (cvh2.f != 0) {
|
|
ieS4.e(cvh2.f);
|
|
}
|
|
}
|
|
|
|
static /* synthetic */ String b(TransferInputAmountFragment transferInputAmountFragment) {
|
|
if (transferInputAmountFragment.viewGroupAccountNumber.getVisibility() == 0) {
|
|
return transferInputAmountFragment.editAccountNumber.getText().toString();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void d(C1019Twi c1019Twi) {
|
|
this.c = c1019Twi.h;
|
|
this.editImageView.setVisibility(8);
|
|
this.editAmount.setFormattedAmount(C6583cXR.c(NumberFormat.getCurrencyInstance()).format(this.c));
|
|
if (this.c > 0.0d && c1019Twi.r) {
|
|
this.editAmount.setEnabled(false);
|
|
}
|
|
this.editAccountNumber.setText(c1019Twi.b);
|
|
this.editAccountNumber.setEnabled(false);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.uqm
|
|
public final void b(String str) {
|
|
this.g = str;
|
|
}
|
|
}
|