what-the-bank/sources/com/scb/phone/view/fragment/investment/onboarding/FundAddressDetailFragment.java

116 lines
5.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.investment.onboarding;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.AddressSearchActivity;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.investment.onboarding.FundAppFormActivity;
import com.scb.phone.view.fragment.ntb.address.BaseAddressFragment;
import o.SP;
/* loaded from: classes5.dex */
public class FundAddressDetailFragment extends Hilt_FundAddressDetailFragment {
RVV d;
private boolean k = false;
private boolean c = false;
private boolean l = false;
/* renamed from: o, reason: collision with root package name */
private boolean f8049o = false;
/* loaded from: classes5.dex */
public interface RVV {
void b();
}
@Override // com.scb.phone.view.fragment.ntb.address.BaseAddressFragment
public final int d() {
return R.layout.2131559761;
}
public static FundAddressDetailFragment e(SP sp, int i, boolean z, boolean z2, boolean z3) {
FundAddressDetailFragment fundAddressDetailFragment = new FundAddressDetailFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("ARG_ADDRESS", sp);
bundle.putInt("BUNDLE_ADDRESS_TYPE", i);
bundle.putInt("BUNDLE_ADDRESS_ORIGINAL_FEATURE", 1);
bundle.putBoolean("ARG_HOME_REGISTERED_SAME_FLAG", z);
bundle.putBoolean("ARG_MAIL_REGISTERED_SAME_FLAG", z2);
bundle.putBoolean("ARG_MAIL_HOME_SAME_FLAG", z3);
fundAddressDetailFragment.setArguments(bundle);
return fundAddressDetailFragment;
}
@Deprecated
public FundAddressDetailFragment() {
}
@Override // com.scb.phone.view.fragment.ntb.address.BaseAddressFragment, androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View onCreateView = super.onCreateView(layoutInflater, viewGroup, bundle);
this.presenter.a(true);
((BaseAddressFragment) this).j = "TH";
this.layoutCustomSpinner.setVisibility(8);
return onCreateView;
}
@Override // androidx.fragment.app.Fragment
public void onStart() {
Bundle arguments;
SP sp;
super.onStart();
if (this.k || (arguments = getArguments()) == null) {
return;
}
if (arguments.containsKey("ARG_ADDRESS") && (sp = (SP) arguments.getParcelable("ARG_ADDRESS")) != null) {
((BaseAddressFragment) this).f = sp;
c(sp, true);
}
if (arguments.containsKey("ARG_HOME_REGISTERED_SAME_FLAG")) {
this.c = arguments.getBoolean("ARG_HOME_REGISTERED_SAME_FLAG");
}
if (arguments.containsKey("ARG_MAIL_REGISTERED_SAME_FLAG")) {
this.l = arguments.getBoolean("ARG_MAIL_REGISTERED_SAME_FLAG");
}
if (arguments.containsKey("ARG_MAIL_HOME_SAME_FLAG")) {
this.f8049o = arguments.getBoolean("ARG_MAIL_HOME_SAME_FLAG");
}
}
@Override // com.scb.phone.view.fragment.ntb.address.BaseAddressFragment
@OnClick
public void onSelectProvinceClick() {
String str;
this.k = true;
Context context = getContext();
if (getActivity() instanceof BaseActivity) {
str = (String) BaseActivity.a(new Object[]{(BaseActivity) getActivity()}, 1198611792, -1198611784, ((Context) Class.forName("android.app.ActivityThread").getMethod("currentApplication", new Class[0]).invoke(null, null)).getApplicationContext().getResources().getString(R.string.debit_card_banking_action).substring(18, 19).codePointAt(0) + 597686520);
} else {
str = "";
}
startActivityForResult(AddressSearchActivity.WU_(context, str), 10002);
}
@Override // com.scb.phone.view.fragment.ntb.address.BaseAddressFragment
@OnClick
public void onNextButtonClick() {
this.presenter.d(this.h, ((BaseAddressFragment) this).j, this.houseNo.inputTextField.getText().toString().trim(), this.moo.inputTextField.getText().toString().trim(), this.roadTH.inputTextField.getText().toString().trim(), this.floor.inputTextField.getText().toString().trim(), this.unit.inputTextField.getText().toString().trim(), this.village.inputTextField.getText().toString().trim(), this.alley.inputTextField.getText().toString().trim(), this.subDistrictLabel.getText().toString(), this.districtLabel.getText().toString(), this.provinceLabel.getText().toString(), this.postalCodeLabel.getText().toString(), this.otherCountryDistrict.inputTextField.getText().toString().trim(), this.otherCountryRoad.inputTextField.getText().toString().trim(), this.city.inputTextField.getText().toString().trim(), this.state.inputTextField.getText().toString().trim(), this.zipCode.inputTextField.getText().toString().trim(), this.c, this.l, this.f8049o);
}
@Override // com.scb.phone.view.fragment.ntb.address.BaseAddressFragment, o.InterfaceC8954dab.LWm
public final void e() {
if (getActivity() instanceof FundAppFormActivity) {
if (this.d != this.unit) {
this.d.b();
}
this.k = false;
getActivity().onBackPressed();
}
}
}