219 lines
8.9 KiB
Java
219 lines
8.9 KiB
Java
package com.scb.phone.view.fragment.requesttopay;
|
|
|
|
import android.animation.Animator;
|
|
import android.content.Intent;
|
|
import android.content.IntentFilter;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.view.ViewTreeObserver;
|
|
import android.widget.ImageView;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.TextView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
import com.huawei.hms.support.api.entity.auth.AuthCode;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.ebillsubscription.EBillSubscriptionActivity;
|
|
import com.scb.phone.view.activity.profilemanagement.promptpay.PromptPayTermsAndConditionsLandingActivity;
|
|
import com.scb.phone.view.activity.promptpay.PromptPayQRActivity;
|
|
import com.scb.phone.view.activity.requesttopay.RequestToPayActivity;
|
|
import com.scb.phone.view.fragment.requesttopay.RequireRequestToPayFragment;
|
|
import o.C10457eEr;
|
|
import o.C12891fKc;
|
|
import o.C4652beH;
|
|
import o.C5968cEl;
|
|
import o.C5969cEm;
|
|
import o.C7882cwi;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC8929daC;
|
|
import o.bSS;
|
|
import o.dCK;
|
|
import o.fSJ;
|
|
import o.fSQ;
|
|
import o.glR;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class RequireRequestToPayFragment extends Hilt_RequireRequestToPayFragment implements InterfaceC8929daC.Sts, ViewTreeObserver.OnGlobalLayoutListener {
|
|
private Animator.AnimatorListener c;
|
|
private fSJ d;
|
|
private boolean g;
|
|
|
|
@InterfaceC13391fZD
|
|
public C5968cEl goManagePromptPayPresenter;
|
|
private dCK i;
|
|
|
|
@BindView
|
|
ImageView mOverlayRequestMoneyTutorialImageView;
|
|
|
|
@BindView
|
|
RelativeLayout mRequestMoneyTutotrialContainer;
|
|
|
|
@BindView
|
|
RelativeLayout mRootView;
|
|
|
|
@BindView
|
|
TextView tvDetail;
|
|
|
|
@BindView
|
|
TextView tvHeaderDetail;
|
|
|
|
public static RequireRequestToPayFragment b(boolean z, dCK dck) {
|
|
RequireRequestToPayFragment requireRequestToPayFragment = new RequireRequestToPayFragment();
|
|
Bundle bundle = new Bundle();
|
|
bundle.putBoolean("BUNDLE_SHOW_TUTORIAL", z);
|
|
bundle.putString("BUNDLE_SOURCE_REQUEST_LANDING_TYPE", dck.b());
|
|
requireRequestToPayFragment.setArguments(bundle);
|
|
return requireRequestToPayFragment;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.2131559878, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
IntentFilter intentFilter = new IntentFilter("com.scb.phone/BROADCAST_END_REQUEST_MONEY_TUTORIAL");
|
|
intentFilter.addAction("com.scb.phone/BROADCAST_END_EBILL_SUBSCRIPTION_TUTORIAL");
|
|
intentFilter.addAction("com.scb.phone/BROADCAST_END_PROMPTPAY_QR_TUTORIAL");
|
|
this.d = glR.Ge_(getActivity(), intentFilter).subscribe(new fSQ(this) { // from class: o.fzI
|
|
private RequireRequestToPayFragment d;
|
|
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
RequireRequestToPayFragment.e(this.d);
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
}, new fSQ() { // from class: o.fzH
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
guQ.a((Throwable) obj);
|
|
}
|
|
});
|
|
this.mRootView.getViewTreeObserver().addOnGlobalLayoutListener(this);
|
|
this.goManagePromptPayPresenter.e((C5968cEl) this);
|
|
Bundle arguments = getArguments();
|
|
this.g = false;
|
|
if (arguments != null) {
|
|
this.g = arguments.getBoolean("BUNDLE_SHOW_TUTORIAL", false);
|
|
dCK c = dCK.c(arguments.getString("BUNDLE_SOURCE_REQUEST_LANDING_TYPE", dCK.REQUEST_MONEY.b()));
|
|
this.i = c;
|
|
if (c == dCK.EBILL_SUBSCRIPTION) {
|
|
this.tvDetail.setText(getString(R.string.request_to_pay_ebill_detail));
|
|
this.tvHeaderDetail.setText(getString(R.string.request_to_pay_is_required_ebill));
|
|
} else {
|
|
this.tvDetail.setText(getString(R.string.request_to_pay_prompt_pay_is_required_detail_new));
|
|
this.tvHeaderDetail.setText(getString(R.string.request_to_pay_is_required_new));
|
|
}
|
|
}
|
|
if (!this.g) {
|
|
this.mOverlayRequestMoneyTutorialImageView.setVisibility(8);
|
|
this.mRequestMoneyTutotrialContainer.setVisibility(8);
|
|
}
|
|
this.c = new Animator.AnimatorListener(this) { // from class: com.scb.phone.view.fragment.requesttopay.RequireRequestToPayFragment.5
|
|
private RequireRequestToPayFragment d;
|
|
|
|
@Override // android.animation.Animator.AnimatorListener
|
|
public final void onAnimationCancel(Animator animator) {
|
|
}
|
|
|
|
@Override // android.animation.Animator.AnimatorListener
|
|
public final void onAnimationRepeat(Animator animator) {
|
|
}
|
|
|
|
@Override // android.animation.Animator.AnimatorListener
|
|
public final void onAnimationStart(Animator animator) {
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
|
|
@Override // android.animation.Animator.AnimatorListener
|
|
public final void onAnimationEnd(Animator animator) {
|
|
RequireRequestToPayFragment.c(this.d);
|
|
}
|
|
};
|
|
return inflate;
|
|
}
|
|
|
|
@Override // o.InterfaceC8929daC.Sts
|
|
public final void d() {
|
|
startActivityForResult(PromptPayTermsAndConditionsLandingActivity.alb_(getContext()), AuthCode.StatusCode.AUTH_INFO_NOT_EXIST);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onActivityResult(int i, int i2, Intent intent) {
|
|
PromptPayQRActivity promptPayQRActivity;
|
|
C7882cwi c7882cwi;
|
|
if (i == 6002) {
|
|
if (this.i == dCK.REQUEST_MONEY && (getActivity() instanceof RequestToPayActivity)) {
|
|
bSS bss = ((RequestToPayActivity) getActivity()).moneyActionPresenter;
|
|
if (bss != null) {
|
|
bss.b();
|
|
}
|
|
} else if (this.i == dCK.EBILL_SUBSCRIPTION && (getActivity() instanceof EBillSubscriptionActivity)) {
|
|
EBillSubscriptionActivity eBillSubscriptionActivity = (EBillSubscriptionActivity) getActivity();
|
|
C4652beH c4652beH = eBillSubscriptionActivity.eBillSubscriptionPresenter;
|
|
if (c4652beH != null) {
|
|
c4652beH.b();
|
|
eBillSubscriptionActivity.eBillSubscriptionPresenter.a();
|
|
}
|
|
} else if (this.i == dCK.PROMPTPAY_QR && (getActivity() instanceof PromptPayQRActivity) && (c7882cwi = (promptPayQRActivity = (PromptPayQRActivity) getActivity()).promptPayQRPresenter) != null) {
|
|
c7882cwi.d();
|
|
promptPayQRActivity.promptPayQRPresenter.a();
|
|
}
|
|
}
|
|
super.onActivityResult(i, i2, intent);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
@OnClick
|
|
public void onTutorialClicked() {
|
|
this.mOverlayRequestMoneyTutorialImageView.setVisibility(8);
|
|
this.mRequestMoneyTutotrialContainer.setVisibility(8);
|
|
C10457eEr.aqd_(this, new Intent("com.scb.phone/BROADCAST_END_REQUEST_MONEY_TUTORIAL"));
|
|
}
|
|
|
|
@Override // android.view.ViewTreeObserver.OnGlobalLayoutListener
|
|
public void onGlobalLayout() {
|
|
this.mRootView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
|
if (this.g) {
|
|
C12891fKc.azJ_(getContext(), this.mRootView, this.mOverlayRequestMoneyTutorialImageView);
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroy() {
|
|
fSJ fsj = this.d;
|
|
if (fsj != null && !fsj.isDisposed()) {
|
|
this.d.dispose();
|
|
}
|
|
super.onDestroy();
|
|
}
|
|
|
|
public static /* synthetic */ void e(RequireRequestToPayFragment requireRequestToPayFragment) {
|
|
requireRequestToPayFragment.mOverlayRequestMoneyTutorialImageView.animate().setDuration(300L).alpha(BitmapDescriptorFactory.HUE_RED).setListener(requireRequestToPayFragment.c);
|
|
requireRequestToPayFragment.mRequestMoneyTutotrialContainer.animate().setDuration(300L).alpha(BitmapDescriptorFactory.HUE_RED).setListener(requireRequestToPayFragment.c);
|
|
}
|
|
|
|
static /* synthetic */ void c(RequireRequestToPayFragment requireRequestToPayFragment) {
|
|
requireRequestToPayFragment.mOverlayRequestMoneyTutorialImageView.setVisibility(8);
|
|
requireRequestToPayFragment.mRequestMoneyTutotrialContainer.setVisibility(8);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
@OnClick
|
|
public void onRequestToPaySettingsClick() {
|
|
C5968cEl c5968cEl = this.goManagePromptPayPresenter;
|
|
C5969cEm c5969cEm = new C5969cEm();
|
|
if (c5968cEl.f != 0) {
|
|
c5969cEm.e(c5968cEl.f);
|
|
}
|
|
}
|
|
}
|