350 lines
12 KiB
Java
350 lines
12 KiB
Java
|
package com.scb.phone.view.fragment.directdebit;
|
||
|
|
||
|
import android.animation.ValueAnimator;
|
||
|
import android.os.Bundle;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import androidx.core.widget.NestedScrollView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.activity.BaseActivity;
|
||
|
import com.scb.phone.view.fragment.directdebit.DirectDebitInputMainFragment;
|
||
|
import com.scb.phone.view.fragment.directdebit.DirectDebitInputSelectedFragment;
|
||
|
import com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment;
|
||
|
import java.util.Calendar;
|
||
|
import o.AbstractC13482fbE;
|
||
|
import o.C1193Xr;
|
||
|
import o.C14866gag;
|
||
|
import o.C14957gcv;
|
||
|
import o.C1842aPv;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC9233dfp;
|
||
|
import o.InterfaceC9663dnz;
|
||
|
import o.WW;
|
||
|
import o.ZI;
|
||
|
import o.hSd;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class DirectDebitInputMainFragment extends Hilt_DirectDebitInputMainFragment implements InterfaceC9233dfp.HBt, AccountSourceSelectFragment.Sts, InterfaceC9663dnz.RVV, InterfaceC9663dnz.HBt, InterfaceC9663dnz.IeS {
|
||
|
public static final Sts d = new Sts(0);
|
||
|
|
||
|
@BindView
|
||
|
public NestedScrollView billPaymentTabNestedScrollView;
|
||
|
private long c;
|
||
|
private DirectDebitInputSelectedFragment f;
|
||
|
private hSd i;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C1842aPv presenter;
|
||
|
|
||
|
@Override // o.InterfaceC9663dnz.IeS
|
||
|
public final InterfaceC9663dnz.ojQ e() {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public static final class Sts {
|
||
|
private Sts() {
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ Sts(byte b) {
|
||
|
this();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
C14866gag c14866gag;
|
||
|
C14957gcv.e(layoutInflater, "");
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559565, viewGroup, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
if (this.presenter == null) {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
AccountSourceSelectFragment b = AccountSourceSelectFragment.b(C1842aPv.b());
|
||
|
AbstractC13482fbE a = getChildFragmentManager().a();
|
||
|
NestedScrollView nestedScrollView = null;
|
||
|
a.b(R.id.fragment_account_source_select, b, null, 2);
|
||
|
a.b();
|
||
|
C1842aPv c1842aPv = this.presenter;
|
||
|
if (c1842aPv == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1842aPv = null;
|
||
|
}
|
||
|
c1842aPv.e((C1842aPv) this);
|
||
|
C1842aPv c1842aPv2 = this.presenter;
|
||
|
if (c1842aPv2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1842aPv2 = null;
|
||
|
}
|
||
|
Bundle arguments = getArguments();
|
||
|
final C1193Xr c1193Xr = arguments != null ? (C1193Xr) arguments.getParcelable("com.scb.phone.EXTRA_BILL_PAYMENT_DISPLAY") : null;
|
||
|
c1842aPv2.b = c1193Xr;
|
||
|
if (c1193Xr != null) {
|
||
|
ZI.IeS ieS = new ZI.IeS(c1193Xr) { // from class: o.aPA
|
||
|
private C1193Xr e;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
C1842aPv.a(this.e, (InterfaceC9233dfp.HBt) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = c1193Xr;
|
||
|
}
|
||
|
};
|
||
|
if (c1842aPv2.f != 0) {
|
||
|
ieS.e(c1842aPv2.f);
|
||
|
}
|
||
|
c14866gag = C14866gag.c;
|
||
|
} else {
|
||
|
c14866gag = null;
|
||
|
}
|
||
|
if (c14866gag == null) {
|
||
|
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.aPE
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9233dfp.HBt) obj).b();
|
||
|
}
|
||
|
};
|
||
|
if (c1842aPv2.f != 0) {
|
||
|
ieS2.e(c1842aPv2.f);
|
||
|
}
|
||
|
}
|
||
|
NestedScrollView nestedScrollView2 = this.billPaymentTabNestedScrollView;
|
||
|
if (nestedScrollView2 != null) {
|
||
|
nestedScrollView = nestedScrollView2;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
nestedScrollView.setOnScrollChangeListener(new NestedScrollView.RVV(this) { // from class: o.eRX
|
||
|
private DirectDebitInputMainFragment e;
|
||
|
|
||
|
@Override // androidx.core.widget.NestedScrollView.RVV
|
||
|
public final void e(NestedScrollView nestedScrollView3, int i, int i2) {
|
||
|
DirectDebitInputMainFragment.e(this.e, nestedScrollView3, i, i2);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = this;
|
||
|
}
|
||
|
});
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public final void onViewCreated(View view, Bundle bundle) {
|
||
|
C14957gcv.e(view, "");
|
||
|
super.onViewCreated(view, bundle);
|
||
|
hSd hsd = new hSd();
|
||
|
this.i = hsd;
|
||
|
hSd hsd2 = hsd;
|
||
|
if (getActivity() != null) {
|
||
|
hsd2.c(((BaseActivity) getActivity()).scbAnalytics, "direct_debit_input");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9233dfp.HBt
|
||
|
public final void b() {
|
||
|
b(new DirectDebitInputBillerListFragment(), R.id.fragment_container_bill_info, "BILLER_PAYMENT_SECONDARY_TABS_TAG", true);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9233dfp.HBt
|
||
|
public final void c(WW ww) {
|
||
|
C14957gcv.e(ww, "");
|
||
|
DirectDebitInputSelectedFragment directDebitInputSelectedFragment = this.f;
|
||
|
if (directDebitInputSelectedFragment != null) {
|
||
|
directDebitInputSelectedFragment.a(ww);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment.Sts
|
||
|
public final void a(WW ww) {
|
||
|
final C1842aPv c1842aPv = this.presenter;
|
||
|
if (c1842aPv == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1842aPv = null;
|
||
|
}
|
||
|
c1842aPv.c = ww;
|
||
|
if (c1842aPv.b != null) {
|
||
|
ZI.IeS ieS = new ZI.IeS(c1842aPv) { // from class: o.aPx
|
||
|
private C1842aPv a;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
C1842aPv.b(this.a, (InterfaceC9233dfp.HBt) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = c1842aPv;
|
||
|
}
|
||
|
};
|
||
|
if (c1842aPv.f != 0) {
|
||
|
ieS.e(c1842aPv.f);
|
||
|
}
|
||
|
c1842aPv.b = null;
|
||
|
}
|
||
|
final WW ww2 = c1842aPv.c;
|
||
|
if (ww2 != null) {
|
||
|
ZI.IeS ieS2 = new ZI.IeS(ww2) { // from class: o.aPC
|
||
|
private WW a;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
C1842aPv.e(this.a, (InterfaceC9233dfp.HBt) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = ww2;
|
||
|
}
|
||
|
};
|
||
|
if (c1842aPv.f != 0) {
|
||
|
ieS2.e(c1842aPv.f);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.transferandpay.BaseReplaceableFragment
|
||
|
public final void aO_() {
|
||
|
super.aO_();
|
||
|
this.f = null;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9663dnz.HBt
|
||
|
public final void b(C1193Xr c1193Xr) {
|
||
|
a(c1193Xr);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9663dnz.IeS
|
||
|
public final void i() {
|
||
|
b(0);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9663dnz.IeS
|
||
|
public final void e(int i) {
|
||
|
b(i);
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public final void onDestroyView() {
|
||
|
C1842aPv c1842aPv = this.presenter;
|
||
|
if (c1842aPv == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1842aPv = null;
|
||
|
}
|
||
|
c1842aPv.w_();
|
||
|
super.onDestroyView();
|
||
|
}
|
||
|
|
||
|
private final void b(final int i) {
|
||
|
NestedScrollView nestedScrollView = this.billPaymentTabNestedScrollView;
|
||
|
if (nestedScrollView == null) {
|
||
|
C14957gcv.a("");
|
||
|
nestedScrollView = null;
|
||
|
}
|
||
|
nestedScrollView.post(new Runnable(this, i) { // from class: o.eRY
|
||
|
private int a;
|
||
|
private DirectDebitInputMainFragment d;
|
||
|
|
||
|
@Override // java.lang.Runnable
|
||
|
public final void run() {
|
||
|
DirectDebitInputMainFragment.b(this.d, this.a);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = this;
|
||
|
this.a = i;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void e(DirectDebitInputMainFragment directDebitInputMainFragment, NestedScrollView nestedScrollView, int i, int i2) {
|
||
|
C14957gcv.e(directDebitInputMainFragment, "");
|
||
|
C14957gcv.e(nestedScrollView, "");
|
||
|
if (i <= i2 || nestedScrollView.getChildAt(0) == null || i < nestedScrollView.getChildAt(0).getMeasuredHeight() - nestedScrollView.getMeasuredHeight() || Calendar.getInstance().getTimeInMillis() - directDebitInputMainFragment.c <= 750) {
|
||
|
return;
|
||
|
}
|
||
|
directDebitInputMainFragment.aJ_();
|
||
|
directDebitInputMainFragment.c = Calendar.getInstance().getTimeInMillis();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void arW_(DirectDebitInputMainFragment directDebitInputMainFragment, ValueAnimator valueAnimator) {
|
||
|
C14957gcv.e(directDebitInputMainFragment, "");
|
||
|
C14957gcv.e(valueAnimator, "");
|
||
|
NestedScrollView nestedScrollView = directDebitInputMainFragment.billPaymentTabNestedScrollView;
|
||
|
if (nestedScrollView == null) {
|
||
|
C14957gcv.a("");
|
||
|
nestedScrollView = null;
|
||
|
}
|
||
|
Object animatedValue = valueAnimator.getAnimatedValue();
|
||
|
C14957gcv.d(animatedValue, "");
|
||
|
nestedScrollView.scrollTo(0, ((Integer) animatedValue).intValue());
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void b(final DirectDebitInputMainFragment directDebitInputMainFragment, int i) {
|
||
|
C14957gcv.e(directDebitInputMainFragment, "");
|
||
|
NestedScrollView nestedScrollView = directDebitInputMainFragment.billPaymentTabNestedScrollView;
|
||
|
if (nestedScrollView == null) {
|
||
|
C14957gcv.a("");
|
||
|
nestedScrollView = null;
|
||
|
}
|
||
|
ValueAnimator ofInt = ValueAnimator.ofInt(nestedScrollView.getScrollY(), i);
|
||
|
ofInt.setDuration(400L);
|
||
|
ofInt.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(directDebitInputMainFragment) { // from class: o.eSb
|
||
|
private DirectDebitInputMainFragment d;
|
||
|
|
||
|
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
|
||
|
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
|
||
|
DirectDebitInputMainFragment.arW_(this.d, valueAnimator);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = directDebitInputMainFragment;
|
||
|
}
|
||
|
});
|
||
|
ofInt.start();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9233dfp.HBt
|
||
|
public final void a(C1193Xr c1193Xr) {
|
||
|
super.aO_();
|
||
|
C1842aPv c1842aPv = null;
|
||
|
this.f = null;
|
||
|
DirectDebitInputSelectedFragment.Sts sts = DirectDebitInputSelectedFragment.c;
|
||
|
String Q = Q();
|
||
|
C14957gcv.c((Object) Q, "");
|
||
|
C1842aPv c1842aPv2 = this.presenter;
|
||
|
if (c1842aPv2 != null) {
|
||
|
c1842aPv = c1842aPv2;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
WW ww = c1842aPv.c;
|
||
|
Bundle arguments = getArguments();
|
||
|
boolean z = arguments != null ? arguments.getBoolean("EXTRA_IS_FROM_SCAN") : false;
|
||
|
C14957gcv.e(Q, "");
|
||
|
DirectDebitInputSelectedFragment directDebitInputSelectedFragment = new DirectDebitInputSelectedFragment();
|
||
|
Bundle bundle = new Bundle();
|
||
|
if (c1193Xr != null) {
|
||
|
bundle.putParcelable("com.scb.phone.EXTRA_BILL_PAYMENT_DISPLAY", c1193Xr);
|
||
|
}
|
||
|
if (ww != null) {
|
||
|
bundle.putParcelable("com.scb.phone.EXTRA_ACCOUNT_SELECTED", ww);
|
||
|
}
|
||
|
bundle.putString("source", Q);
|
||
|
bundle.putBoolean("EXTRA_IS_FROM_SCAN", z);
|
||
|
directDebitInputSelectedFragment.setArguments(bundle);
|
||
|
this.f = directDebitInputSelectedFragment;
|
||
|
e(directDebitInputSelectedFragment, R.id.fragment_container_bill_info, "BILLER_PAYMENT_SELECTED_FRAGMENT_TAG", true, true);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9663dnz.RVV
|
||
|
public final void c() {
|
||
|
super.aO_();
|
||
|
this.f = null;
|
||
|
b(new DirectDebitInputBillerListFragment(), R.id.fragment_container_bill_info, "BILLER_PAYMENT_SECONDARY_TABS_TAG", true);
|
||
|
}
|
||
|
}
|