what-the-bank/sources/com/scb/phone/view/fragment/chequemanagement/stopcheque/StopChequeInputFragment.java

134 lines
4.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.chequemanagement.stopcheque;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.RelativeLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.chequemanagement.stopcheque.StopChequeReviewActivity;
import com.scb.phone.view.custom.common.CustomProxyNumber;
import com.scb.phone.view.custom.common.ScbEditText;
import o.AeN;
import o.BVc;
import o.C0531Iw;
import o.C1189Xo;
import o.C3434axV;
import o.InterfaceC12866fJj;
import o.InterfaceC13391fZD;
import o.InterfaceC6617cYF;
/* loaded from: classes5.dex */
public class StopChequeInputFragment extends Hilt_StopChequeInputFragment implements InterfaceC6617cYF.HBt, InterfaceC12866fJj, CustomProxyNumber.Sts {
@BindView
Button btnStopChequeReview;
private String c = "";
private String d;
@BindView
CustomProxyNumber editTextChequeNo;
@InterfaceC13391fZD
public C3434axV presenter;
@BindView
RelativeLayout rootView;
@Override // o.InterfaceC12866fJj
public final void a(C0531Iw c0531Iw) {
}
@Override // o.InterfaceC6617cYF.IeS
public final void c() {
}
@Override // o.InterfaceC6617cYF.IeS
public final void e() {
}
@Override // o.InterfaceC12866fJj
public final void t_(String str) {
}
public static StopChequeInputFragment b(String str) {
StopChequeInputFragment stopChequeInputFragment = new StopChequeInputFragment();
Bundle bundle = new Bundle();
bundle.putString("EXTRA_ACCOUNT_NO_FROM", str);
stopChequeInputFragment.setArguments(bundle);
return stopChequeInputFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559945, viewGroup, false);
ButterKnife.c(this, inflate);
this.presenter.e((C3434axV) this);
this.d = getArguments().getString("EXTRA_ACCOUNT_NO_FROM");
this.editTextChequeNo.setProxyLabel(getString(R.string.stop_cheque_input_label));
this.editTextChequeNo.setProxyHint(getString(R.string.stop_cheque_input_hint));
this.editTextChequeNo.setErrorInLine(R.string.incomplete_information);
this.editTextChequeNo.setOnProxyNumberListener(this);
this.editTextChequeNo.setOnFocusChangeListener(this);
this.editTextChequeNo.setMaxLength(8);
this.editTextChequeNo.b();
this.editTextChequeNo.setOnPasteListener(new ScbEditText.HBt());
this.btnStopChequeReview.setEnabled(false);
v("stopchq_input");
return inflate;
}
@OnClick
public void onReviewButtonClick() {
String a = this.editTextChequeNo.a();
this.editTextChequeNo.setFieldToOriginBackground();
String string = getArguments().getString("EXTRA_ACCOUNT_NO_FROM", "");
C3434axV c3434axV = this.presenter;
c3434axV.e.b(new AeN(string, a));
BVc bVc = c3434axV.e;
bVc.d(bVc.i, new C3434axV.Sts(c3434axV, string, a));
}
@Override // o.InterfaceC12866fJj
public final void bp_() {
((BaseActivity) getActivity()).aN_();
}
@Override // o.InterfaceC12866fJj
public final void f() {
((BaseActivity) getActivity()).aN_();
}
@Override // o.InterfaceC12866fJj
public final void d(String str) {
this.c = str;
this.editTextChequeNo.setFieldToOriginBackground();
this.btnStopChequeReview.setEnabled(str.length() == 8);
}
@Override // com.scb.phone.view.custom.common.CustomProxyNumber.Sts
public final void e(boolean z) {
if (z || this.c.length() == 8) {
this.editTextChequeNo.setFieldToOriginBackground();
this.editTextChequeNo.setErrorValidationVisibility(8);
} else {
this.editTextChequeNo.setFieldToErrorRedBackground();
this.editTextChequeNo.setErrorValidationVisibility(0);
}
}
@Override // o.InterfaceC6617cYF.HBt
public final void a(C1189Xo c1189Xo) {
c1189Xo.X = this.d;
Intent intent = new Intent(getContext(), (Class<?>) StopChequeReviewActivity.class);
intent.putExtra("com.scb.phone.EXTRA_REVIEW", c1189Xo);
startActivity(intent);
}
}