what-the-bank/sources/com/scb/phone/view/fragment/easycash/EasycashSuccessDialogFragme...

149 lines
4.6 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.easycash;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Optional;
import com.scb.phone.R;
import o.C0596Kg;
/* loaded from: classes5.dex */
public class EasycashSuccessDialogFragment extends Hilt_EasycashSuccessDialogFragment {
@BindView
protected Button buttonDone;
@BindView
protected Button buttonPurple;
private HBt e;
@BindView
protected TextView secondaryButton;
@BindView
protected TextView subTitle;
@BindView
protected TextView title;
/* loaded from: classes5.dex */
public interface HBt {
void aW_();
void j();
}
public static EasycashSuccessDialogFragment a(C0596Kg c0596Kg) {
EasycashSuccessDialogFragment easycashSuccessDialogFragment = new EasycashSuccessDialogFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("com.scb.phone.EXTRA_EASYCASH_SUCCESS", c0596Kg);
bundle.putBoolean("com.scb.phone.EXTRA_EASYCASH_SUCCESS_CANCELABLE", false);
easycashSuccessDialogFragment.setArguments(bundle);
return easycashSuccessDialogFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559363, viewGroup, false);
ButterKnife.c(this, inflate);
setCancelable(getArguments().getBoolean("com.scb.phone.EXTRA_EASYCASH_SUCCESS_CANCELABLE"));
C0596Kg c0596Kg = (C0596Kg) getArguments().getParcelable("com.scb.phone.EXTRA_EASYCASH_SUCCESS");
if (!TextUtils.isEmpty(c0596Kg.f)) {
String str = c0596Kg.f;
this.title.setVisibility(0);
this.title.setText(str);
}
if (!TextUtils.isEmpty(c0596Kg.d)) {
String str2 = c0596Kg.d;
this.subTitle.setVisibility(0);
this.subTitle.setText(str2);
}
if (!TextUtils.isEmpty(c0596Kg.c)) {
String str3 = c0596Kg.c;
this.buttonDone.setVisibility(0);
this.buttonDone.setText(str3);
}
if (!TextUtils.isEmpty(c0596Kg.a)) {
String str4 = c0596Kg.a;
this.secondaryButton.setVisibility(0);
this.secondaryButton.setText(str4);
}
if (!TextUtils.isEmpty(c0596Kg.b)) {
String str5 = c0596Kg.b;
this.buttonPurple.setVisibility(0);
this.buttonPurple.setText(str5);
}
return inflate;
}
@OnClick
public void onClick() {
dismiss();
this.e.j();
}
@OnClick
@Optional
public void onPurpleButtonClick() {
dismiss();
this.e.aW_();
}
@OnClick
@Optional
public void onSecondaryButtonClick() {
dismiss();
this.e.aW_();
}
@Override // androidx.fragment.app.DialogFragment
public Dialog onCreateDialog(Bundle bundle) {
setStyle(1, R.style.f52332132017482);
return new Dialog(this, getActivity(), getTheme()) { // from class: com.scb.phone.view.fragment.easycash.EasycashSuccessDialogFragment.2
private EasycashSuccessDialogFragment d;
{
this.d = this;
}
@Override // android.app.Dialog
public final void onBackPressed() {
this.d.onClick();
}
};
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.scb.phone.view.fragment.easycash.Hilt_EasycashSuccessDialogFragment, androidx.fragment.app.DialogFragment, androidx.fragment.app.Fragment
public void onAttach(Context context) {
super.onAttach(context);
if (getParentFragment() instanceof HBt) {
this.e = (HBt) getParentFragment();
} else {
if (context instanceof HBt) {
this.e = (HBt) context;
return;
}
StringBuilder sb = new StringBuilder();
sb.append(context.toString());
sb.append(" must implement OnEasyCashSuccessDialogListener");
throw new ClassCastException(sb.toString());
}
}
@Override // androidx.fragment.app.Fragment
public void onDestroy() {
this.e = null;
super.onDestroy();
}
}