200 lines
7.9 KiB
Java
200 lines
7.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 androidx.viewpager.widget.ViewPager;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
import com.google.android.material.tabs.TabLayout;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.BaseActivity;
|
|
import com.scb.phone.view.fragment.requesttopay.RequestToPayLandingFragment;
|
|
import o.C10457eEr;
|
|
import o.C12474eyr;
|
|
import o.C12891fKc;
|
|
import o.fSJ;
|
|
import o.fSQ;
|
|
import o.glR;
|
|
import o.pug;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class RequestToPayLandingFragment extends Hilt_RequestToPayLandingFragment implements ViewTreeObserver.OnGlobalLayoutListener {
|
|
private Animator.AnimatorListener c;
|
|
private fSJ d;
|
|
private String g;
|
|
private boolean i;
|
|
|
|
@BindView
|
|
ImageView mOverlayRequestMoneyTutorialImageView;
|
|
|
|
@BindView
|
|
RelativeLayout mRequestMoneyTutorialContainer;
|
|
|
|
@BindView
|
|
RelativeLayout mRootView;
|
|
|
|
@BindView
|
|
TabLayout tabLayout;
|
|
|
|
@BindView
|
|
ViewPager tabPager;
|
|
|
|
@BindView
|
|
TextView tvRequestToPayTutorial;
|
|
|
|
public static RequestToPayLandingFragment a(boolean z, String str) {
|
|
RequestToPayLandingFragment requestToPayLandingFragment = new RequestToPayLandingFragment();
|
|
Bundle bundle = new Bundle();
|
|
bundle.putBoolean("BUNDLE_SHOW_TUTORIAL", z);
|
|
bundle.putString("source", str);
|
|
requestToPayLandingFragment.setArguments(bundle);
|
|
return requestToPayLandingFragment;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.2131559874, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
this.g = Q();
|
|
c("rtp_landing", new pug("source", this.g), new pug("subtype", "outgoing"));
|
|
IntentFilter intentFilter = new IntentFilter("com.scb.phone/BROADCAST_END_REQUEST_MONEY_TUTORIAL");
|
|
intentFilter.addAction("com.scb.phone/BROADCAST_END_EBILL_SUBSCRIPTION_TUTORIAL");
|
|
this.d = glR.Ge_(getActivity(), intentFilter).subscribe(new fSQ(this) { // from class: o.fzv
|
|
private RequestToPayLandingFragment a;
|
|
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
RequestToPayLandingFragment.c(this.a);
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
}
|
|
}, new fSQ() { // from class: o.fzz
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
guQ.a((Throwable) obj);
|
|
}
|
|
});
|
|
this.mRootView.getViewTreeObserver().addOnGlobalLayoutListener(this);
|
|
this.tabPager.setAdapter(new C12474eyr(getFragmentManager(), getContext(), Q()));
|
|
this.tabPager.addOnPageChangeListener(new ViewPager.ojQ(this) { // from class: com.scb.phone.view.fragment.requesttopay.RequestToPayLandingFragment.2
|
|
private RequestToPayLandingFragment a;
|
|
|
|
@Override // androidx.viewpager.widget.ViewPager.ojQ
|
|
public final void onPageScrollStateChanged(int i) {
|
|
}
|
|
|
|
@Override // androidx.viewpager.widget.ViewPager.ojQ
|
|
public final void onPageScrolled(int i, float f, int i2) {
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
}
|
|
|
|
@Override // androidx.viewpager.widget.ViewPager.ojQ
|
|
public final void onPageSelected(int i) {
|
|
if (i == 0) {
|
|
RequestToPayLandingFragment requestToPayLandingFragment = this.a;
|
|
pug[] pugVarArr = {new pug("source", this.a.g), new pug("subtype", "outgoing")};
|
|
if (requestToPayLandingFragment.getActivity() != null) {
|
|
((BaseActivity) requestToPayLandingFragment.getActivity()).scbAnalytics.e("rtp_landing", pugVarArr);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (i == 1) {
|
|
RequestToPayLandingFragment requestToPayLandingFragment2 = this.a;
|
|
pug[] pugVarArr2 = {new pug("source", this.a.g), new pug("subtype", "incoming")};
|
|
if (requestToPayLandingFragment2.getActivity() != null) {
|
|
((BaseActivity) requestToPayLandingFragment2.getActivity()).scbAnalytics.e("rtp_landing", pugVarArr2);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
this.tabLayout.setupWithViewPager(this.tabPager);
|
|
Bundle arguments = getArguments();
|
|
this.i = false;
|
|
if (arguments != null) {
|
|
this.i = arguments.getBoolean("BUNDLE_SHOW_TUTORIAL", false);
|
|
}
|
|
if (!this.i) {
|
|
this.mOverlayRequestMoneyTutorialImageView.setVisibility(8);
|
|
this.mRequestMoneyTutorialContainer.setVisibility(8);
|
|
}
|
|
this.c = new Animator.AnimatorListener(this) { // from class: com.scb.phone.view.fragment.requesttopay.RequestToPayLandingFragment.4
|
|
private RequestToPayLandingFragment b;
|
|
|
|
@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.b = this;
|
|
}
|
|
|
|
@Override // android.animation.Animator.AnimatorListener
|
|
public final void onAnimationEnd(Animator animator) {
|
|
RequestToPayLandingFragment.b(this.b);
|
|
}
|
|
};
|
|
this.tvRequestToPayTutorial.setText(getString(R.string.request_to_pay_tutorial_new));
|
|
return inflate;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
@OnClick
|
|
public void onTutorialClicked() {
|
|
this.mOverlayRequestMoneyTutorialImageView.setVisibility(8);
|
|
this.mRequestMoneyTutorialContainer.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.i) {
|
|
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 c(RequestToPayLandingFragment requestToPayLandingFragment) {
|
|
requestToPayLandingFragment.mOverlayRequestMoneyTutorialImageView.animate().setDuration(300L).alpha(BitmapDescriptorFactory.HUE_RED).setListener(requestToPayLandingFragment.c);
|
|
requestToPayLandingFragment.mRequestMoneyTutorialContainer.animate().setDuration(300L).alpha(BitmapDescriptorFactory.HUE_RED).setListener(requestToPayLandingFragment.c);
|
|
}
|
|
|
|
static /* synthetic */ void b(RequestToPayLandingFragment requestToPayLandingFragment) {
|
|
requestToPayLandingFragment.mOverlayRequestMoneyTutorialImageView.setVisibility(8);
|
|
requestToPayLandingFragment.mRequestMoneyTutorialContainer.setVisibility(8);
|
|
}
|
|
}
|