275 lines
8.9 KiB
Java
275 lines
8.9 KiB
Java
package com.scb.phone.view.fragment.investment.assessment;
|
|
|
|
import android.content.DialogInterface;
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.Button;
|
|
import android.widget.TextView;
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.huawei.hms.support.api.entity.common.CommonConstant;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.BaseActivity;
|
|
import com.scb.phone.view.activity.investment.FundFactSheetActivity;
|
|
import com.scb.phone.view.adapter.suitabilityassessment.QuestionnaireRecyclerViewAdapter;
|
|
import com.scb.phone.view.custom.common.CustomDialog;
|
|
import com.scb.phone.view.fragment.investment.assessment.RegalQuestionnaireFragment;
|
|
import o.AbstractC14961gcz;
|
|
import o.C0819Pd;
|
|
import o.C14957gcv;
|
|
import o.C16060koA;
|
|
import o.InterfaceC12867fJk;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC13393fZL;
|
|
import o.InterfaceC14890gbN;
|
|
import o.InterfaceC9383dih;
|
|
import o.OD;
|
|
import o.bAV;
|
|
import o.fZZ;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class RegalQuestionnaireFragment extends Hilt_RegalQuestionnaireFragment implements InterfaceC9383dih.LWm, InterfaceC12867fJk {
|
|
public static final IeS d = new IeS(0);
|
|
|
|
@BindView
|
|
public Button btContinue;
|
|
private final InterfaceC13393fZL c;
|
|
|
|
@InterfaceC13391fZD
|
|
public bAV presenter;
|
|
|
|
@BindView
|
|
public RecyclerView rvQuestions;
|
|
|
|
@BindView
|
|
public TextView tvRiskSubTitle;
|
|
|
|
@BindView
|
|
public TextView tvRiskTitle;
|
|
|
|
public static /* synthetic */ void d() {
|
|
}
|
|
|
|
public RegalQuestionnaireFragment() {
|
|
RVV rvv = RVV.c;
|
|
C14957gcv.e(rvv, "");
|
|
this.c = new fZZ(rvv);
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class IeS {
|
|
private IeS() {
|
|
}
|
|
|
|
public /* synthetic */ IeS(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
View inflate = layoutInflater.inflate(R.layout.2131559883, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
bAV bav = this.presenter;
|
|
bAV bav2 = null;
|
|
if (bav == null) {
|
|
C14957gcv.a("");
|
|
bav = null;
|
|
}
|
|
bav.e((bAV) this);
|
|
Bundle arguments = getArguments();
|
|
OD od = arguments != null ? (OD) arguments.getParcelable(CommonConstant.ReqAccessTokenParam.DISPLAY_LABEL) : null;
|
|
bAV bav3 = this.presenter;
|
|
if (bav3 != null) {
|
|
bav2 = bav3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
bav2.b(od);
|
|
return inflate;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onViewCreated(View view, Bundle bundle) {
|
|
C14957gcv.e(view, "");
|
|
super.onViewCreated(view, bundle);
|
|
TextView textView = this.tvRiskTitle;
|
|
Button button = null;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(R.string.regal_risk_questionnaire_title);
|
|
TextView textView2 = this.tvRiskSubTitle;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
textView2.setText(R.string.regal_risk_questionnaire_subtitle);
|
|
Button button2 = this.btContinue;
|
|
if (button2 != null) {
|
|
button = button2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
button.setText(R.string.next_button);
|
|
C16060koA c16060koA = (C16060koA) this.c.e();
|
|
if (getActivity() != null) {
|
|
c16060koA.c(((BaseActivity) getActivity()).scbAnalytics, "knowledge_assessment_landing");
|
|
}
|
|
}
|
|
|
|
@OnClick
|
|
public final void continueButtonClicked() {
|
|
bAV bav = this.presenter;
|
|
if (bav == null) {
|
|
C14957gcv.a("");
|
|
bav = null;
|
|
}
|
|
bav.d();
|
|
}
|
|
|
|
@Override // o.InterfaceC9383dih.LWm
|
|
public final void d(C0819Pd c0819Pd) {
|
|
C14957gcv.e(c0819Pd, "");
|
|
RecyclerView recyclerView = this.rvQuestions;
|
|
RecyclerView recyclerView2 = null;
|
|
if (recyclerView == null) {
|
|
C14957gcv.a("");
|
|
recyclerView = null;
|
|
}
|
|
getContext();
|
|
recyclerView.setLayoutManager(new LinearLayoutManager(1, false));
|
|
RecyclerView recyclerView3 = this.rvQuestions;
|
|
if (recyclerView3 == null) {
|
|
C14957gcv.a("");
|
|
recyclerView3 = null;
|
|
}
|
|
recyclerView3.setNestedScrollingEnabled(false);
|
|
RecyclerView recyclerView4 = this.rvQuestions;
|
|
if (recyclerView4 != null) {
|
|
recyclerView2 = recyclerView4;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
recyclerView2.setAdapter(new QuestionnaireRecyclerViewAdapter(c0819Pd, this));
|
|
}
|
|
|
|
@Override // o.InterfaceC9383dih.LWm
|
|
public final void b(boolean z) {
|
|
Button button = this.btContinue;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setEnabled(z);
|
|
}
|
|
|
|
@Override // o.InterfaceC12867fJk
|
|
public final void b(C0819Pd c0819Pd) {
|
|
if (c0819Pd != null) {
|
|
bAV bav = this.presenter;
|
|
if (bav == null) {
|
|
C14957gcv.a("");
|
|
bav = null;
|
|
}
|
|
bav.d(c0819Pd);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9383dih.LWm
|
|
public final void b() {
|
|
((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.regal_risk_waring_title).d(R.string.regal_risk_waring_message).aoT_(R.string.confirm, new DialogInterface.OnClickListener(this) { // from class: o.fgo
|
|
private RegalQuestionnaireFragment b;
|
|
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
RegalQuestionnaireFragment.a(this.b);
|
|
}
|
|
|
|
{
|
|
this.b = this;
|
|
}
|
|
}), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener() { // from class: o.fgm
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
RegalQuestionnaireFragment.d();
|
|
}
|
|
}})).show();
|
|
}
|
|
|
|
@Override // o.InterfaceC9383dih.LWm
|
|
public final void e() {
|
|
Bundle arguments = getArguments();
|
|
OD od = arguments != null ? (OD) arguments.getParcelable(CommonConstant.ReqAccessTokenParam.DISPLAY_LABEL) : null;
|
|
Bundle arguments2 = getArguments();
|
|
String string = arguments2 != null ? arguments2.getString("EXTRA_EVENT_NAME", "") : null;
|
|
if (od != null) {
|
|
startActivityForResult(FundFactSheetActivity.agN_(getContext(), od.c, od, string), 1331);
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public final void onDestroy() {
|
|
bAV bav = this.presenter;
|
|
if (bav == null) {
|
|
C14957gcv.a("");
|
|
bav = null;
|
|
}
|
|
bav.w_();
|
|
super.onDestroy();
|
|
}
|
|
|
|
@Override // o.InterfaceC9383dih.LWm
|
|
public final void a(String str) {
|
|
C14957gcv.e(str, "");
|
|
((C16060koA) this.c.e()).e(str);
|
|
C16060koA c16060koA = (C16060koA) this.c.e();
|
|
if (getActivity() != null) {
|
|
c16060koA.c(((BaseActivity) getActivity()).scbAnalytics, "knowledge_assessment_submit");
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public final void onActivityResult(int i, int i2, Intent intent) {
|
|
FragmentActivity activity;
|
|
super.onActivityResult(i, i2, intent);
|
|
boolean booleanExtra = intent != null ? intent.getBooleanExtra("REVIEW_IS_ERROR", false) : false;
|
|
if (i == 1331 && i2 == 0 && booleanExtra && (activity = getActivity()) != null) {
|
|
activity.finish();
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
static final class RVV extends AbstractC14961gcz implements InterfaceC14890gbN<C16060koA> {
|
|
public static final RVV c = new RVV();
|
|
|
|
@Override // o.InterfaceC14890gbN
|
|
public final /* synthetic */ C16060koA invoke() {
|
|
return new C16060koA();
|
|
}
|
|
|
|
RVV() {
|
|
super(0);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(RegalQuestionnaireFragment regalQuestionnaireFragment) {
|
|
C14957gcv.e(regalQuestionnaireFragment, "");
|
|
bAV bav = regalQuestionnaireFragment.presenter;
|
|
if (bav == null) {
|
|
C14957gcv.a("");
|
|
bav = null;
|
|
}
|
|
bav.b();
|
|
}
|
|
}
|