129 lines
4.8 KiB
Java
129 lines
4.8 KiB
Java
package com.scb.phone.view.fragment.moneyaction;
|
|
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.ImageView;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.BaseActivity;
|
|
import com.scb.phone.view.activity.HomeActivity;
|
|
import com.scb.phone.view.activity.PreLoadCheckActivity;
|
|
import com.scb.phone.view.activity.requesttopay.RequestToPayActivity;
|
|
import com.scb.phone.view.activity.transferandpay.ScanPaymentActivity;
|
|
import com.scb.phone.view.activity.transferandpay.billpayment.BillPaymentActivity;
|
|
import com.scb.phone.view.activity.transferandpay.cardlessatm.CardlessATMTutorialActivity;
|
|
import com.scb.phone.view.activity.transferandpay.topup.TopUpActivity;
|
|
import com.scb.phone.view.activity.transferandpay.transfer.TransferActivity;
|
|
import com.scb.phone.view.adapter.moneyaction.MoneyActionAdapter;
|
|
import java.io.File;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import o.BKa;
|
|
import o.C12891fKc;
|
|
import o.InterfaceC12825fIZ;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC9505dkx;
|
|
import o.bSS;
|
|
import o.gHK;
|
|
import o.nMh;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class MoneyActionFragment extends Hilt_MoneyActionFragment implements InterfaceC12825fIZ {
|
|
|
|
@BindView
|
|
ImageView bgMoneyMovement;
|
|
|
|
@InterfaceC13391fZD
|
|
public InterfaceC9505dkx iDeviceCompatibilityHelper;
|
|
|
|
@BindView
|
|
ImageView mImageView;
|
|
|
|
@BindView
|
|
RecyclerView mRecyclerView;
|
|
|
|
@InterfaceC13391fZD
|
|
public bSS moneyActionPresenter;
|
|
|
|
public static MoneyActionFragment a(byte[] bArr) {
|
|
MoneyActionFragment moneyActionFragment = new MoneyActionFragment();
|
|
Bundle bundle = new Bundle();
|
|
bundle.putByteArray("EXTRA_BITMAP", bArr);
|
|
moneyActionFragment.setArguments(bundle);
|
|
return moneyActionFragment;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
ArrayList arrayList;
|
|
((HomeActivity) getActivity()).k = true;
|
|
View inflate = layoutInflater.inflate(R.layout.2131559770, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
getArguments().getByteArray("EXTRA_BITMAP");
|
|
if (bSS.AnonymousClass3.d[this.moneyActionPresenter.a.d().ordinal()] == 1) {
|
|
arrayList = new ArrayList(Arrays.asList(3, 4, 5));
|
|
} else {
|
|
arrayList = new ArrayList(Arrays.asList(0, 1, 2, 3, 4, 5));
|
|
}
|
|
this.mRecyclerView.setAdapter(new MoneyActionAdapter(this, arrayList));
|
|
this.mRecyclerView.setNestedScrollingEnabled(true);
|
|
if (this.moneyActionPresenter.c.c.d() && !this.moneyActionPresenter.c.c.e()) {
|
|
if (gHK.INDIVIDUAL == (getActivity() instanceof PreLoadCheckActivity ? ((PreLoadCheckActivity) getActivity()).al() : null)) {
|
|
C12891fKc.azG_(new File(this.moneyActionPresenter.c.c.c(), BKa.BG_MONEY_MOVEMENT.component), this.bgMoneyMovement, nMh.getDrawable(getContext(), R.drawable.bg_money_out));
|
|
}
|
|
}
|
|
return inflate;
|
|
}
|
|
|
|
@Override // o.InterfaceC12825fIZ
|
|
public final void a(int i) {
|
|
if (i == 0) {
|
|
((BaseActivity) getActivity()).scbAnalytics.c("action_mm_requestmoney");
|
|
RequestToPayActivity.b(getContext(), "");
|
|
return;
|
|
}
|
|
if (i == 1) {
|
|
((BaseActivity) getActivity()).scbAnalytics.c("action_mm_cardlessatm");
|
|
CardlessATMTutorialActivity.e(getContext(), "moneyMovement");
|
|
return;
|
|
}
|
|
if (i == 2) {
|
|
if (this.iDeviceCompatibilityHelper.d()) {
|
|
((BaseActivity) getActivity()).scbAnalytics.c("action_mm_scanpayment");
|
|
startActivity(new Intent(getContext(), (Class<?>) ScanPaymentActivity.class));
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (i == 3) {
|
|
((BaseActivity) getActivity()).scbAnalytics.c("action_mm_topup");
|
|
TopUpActivity.e(getContext(), "input");
|
|
} else {
|
|
if (i != 4) {
|
|
if (i == 5) {
|
|
((BaseActivity) getActivity()).scbAnalytics.c("action_mm_billpayment");
|
|
BillPaymentActivity.e(getContext(), "input");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
((BaseActivity) getActivity()).scbAnalytics.c("action_mm_transfer");
|
|
Object[] objArr = {getContext(), "input"};
|
|
TransferActivity.a(objArr);
|
|
}
|
|
}
|
|
|
|
@OnClick
|
|
public void onOutsideClick() {
|
|
if (getActivity() != null) {
|
|
getActivity().onBackPressed();
|
|
}
|
|
}
|
|
}
|