what-the-bank/sources/com/scb/phone/view/fragment/prepaid/cashout/PrepaidCashOutInputFragment...

161 lines
5.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.prepaid.cashout;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.AmountEditText;
import com.scb.phone.view.custom.common.DefaultButton;
import com.scb.phone.view.custom.common.NoteEditText;
import com.scb.phone.view.fragment.prepaid.cashout.PrepaidCashOutInputFragment;
import o.C14957gcv;
/* loaded from: classes5.dex */
public final class PrepaidCashOutInputFragment extends Hilt_PrepaidCashOutInputFragment implements AmountEditText.RVV {
public static final LWm d = new LWm(0);
@BindView
public DefaultButton btnReview;
private IeS c;
@BindView
public AmountEditText mAmountEditText;
@BindView
public NoteEditText mNoteEditText;
/* loaded from: classes5.dex */
public interface IeS {
void a(String str, String str2);
void a(boolean z, String str);
void e(String str);
}
/* loaded from: classes5.dex */
public static final class LWm {
private LWm() {
}
public /* synthetic */ LWm(byte b) {
this();
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559487, viewGroup, false);
ButterKnife.c(this, inflate);
AmountEditText amountEditText = this.mAmountEditText;
NoteEditText noteEditText = null;
if (amountEditText == null) {
C14957gcv.a("");
amountEditText = null;
}
amountEditText.setMaximumDecimalDigit(13);
AmountEditText amountEditText2 = this.mAmountEditText;
if (amountEditText2 == null) {
C14957gcv.a("");
amountEditText2 = null;
}
amountEditText2.setOnAmountChangeListener(this);
DefaultButton defaultButton = this.btnReview;
if (defaultButton == null) {
C14957gcv.a("");
defaultButton = null;
}
defaultButton.setButtonEnabled(false);
NoteEditText noteEditText2 = this.mNoteEditText;
if (noteEditText2 != null) {
noteEditText = noteEditText2;
} else {
C14957gcv.a("");
}
noteEditText.setOnNoteInputListener(new NoteEditText.IeS(this) { // from class: o.ftS
private PrepaidCashOutInputFragment a;
@Override // com.scb.phone.view.custom.common.NoteEditText.IeS
public final void d(boolean z) {
PrepaidCashOutInputFragment.d(this.a, z);
}
{
this.a = this;
}
}, "^(?=\\S)[0-9a-zA-Z\\u0E00-\\u0E3E\\u0E40-\\u0E7F _*'\"#&*()@\\-]+$", false);
return inflate;
}
@OnClick
public final void btnReviewClicked(View view) {
C14957gcv.e(view, "");
IeS ieS = this.c;
if (ieS != null) {
AmountEditText amountEditText = this.mAmountEditText;
NoteEditText noteEditText = null;
if (amountEditText == null) {
C14957gcv.a("");
amountEditText = null;
}
String valueOf = String.valueOf(amountEditText.getText());
NoteEditText noteEditText2 = this.mNoteEditText;
if (noteEditText2 != null) {
noteEditText = noteEditText2;
} else {
C14957gcv.a("");
}
String obj = noteEditText.mNoteEditText.getText().toString();
C14957gcv.c((Object) obj, "");
ieS.a(valueOf, obj);
}
}
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
public final void b(double d2) {
IeS ieS = this.c;
if (ieS != null) {
AmountEditText amountEditText = this.mAmountEditText;
if (amountEditText == null) {
C14957gcv.a("");
amountEditText = null;
}
ieS.e(String.valueOf(amountEditText.getText()));
}
}
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
public final void a() {
IeS ieS = this.c;
if (ieS != null) {
AmountEditText amountEditText = this.mAmountEditText;
if (amountEditText == null) {
C14957gcv.a("");
amountEditText = null;
}
ieS.e(String.valueOf(amountEditText.getText()));
}
aN_();
}
public static /* synthetic */ void d(PrepaidCashOutInputFragment prepaidCashOutInputFragment, boolean z) {
C14957gcv.e(prepaidCashOutInputFragment, "");
IeS ieS = prepaidCashOutInputFragment.c;
if (ieS != null) {
NoteEditText noteEditText = prepaidCashOutInputFragment.mNoteEditText;
if (noteEditText == null) {
C14957gcv.a("");
noteEditText = null;
}
String obj = noteEditText.mNoteEditText.getText().toString();
C14957gcv.c((Object) obj, "");
ieS.a(z, obj);
}
}
}