121 lines
3.3 KiB
Java
121 lines
3.3 KiB
Java
package com.scb.phone.view.fragment;
|
|
|
|
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.ImageView;
|
|
import android.widget.TextView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.contactus.ContactUsActivity;
|
|
import o.EV;
|
|
import o.InterfaceC13391fZD;
|
|
import o.ZI;
|
|
import o.ZX;
|
|
import o.cYV;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class ErrorFragment extends Hilt_ErrorFragment implements cYV {
|
|
|
|
@BindView
|
|
Button btContactUs;
|
|
public EV c;
|
|
|
|
@BindView
|
|
public TextView errorDescription;
|
|
|
|
@BindView
|
|
ImageView errorIcon;
|
|
|
|
@BindView
|
|
TextView errorTitle;
|
|
|
|
@InterfaceC13391fZD
|
|
public ZX presenter;
|
|
|
|
public static ErrorFragment a(EV ev) {
|
|
Bundle bundle = new Bundle();
|
|
bundle.putParcelable("ERROR_DISPLAY_EXTRA", ev);
|
|
ErrorFragment errorFragment = new ErrorFragment();
|
|
errorFragment.setArguments(bundle);
|
|
return errorFragment;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.2131559979, viewGroup, false);
|
|
this.presenter.e((ZX) this);
|
|
ButterKnife.c(this, inflate);
|
|
if (getArguments() != null && getArguments().containsKey("ERROR_DISPLAY_EXTRA")) {
|
|
boolean z = getArguments().getBoolean("EXTRA_IS_SHOW_CONTACT_US_BUTTON", false);
|
|
final EV ev = (EV) getArguments().getParcelable("ERROR_DISPLAY_EXTRA");
|
|
this.c = ev;
|
|
ZX zx = this.presenter;
|
|
if (ev != null) {
|
|
if (z) {
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.ZW
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((cYV) obj).d();
|
|
}
|
|
};
|
|
if (zx.f != 0) {
|
|
ieS.e(zx.f);
|
|
}
|
|
}
|
|
ZI.IeS ieS2 = new ZI.IeS(ev) { // from class: o.ZV
|
|
private EV d;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
ZX.b(this.d, (cYV) obj);
|
|
}
|
|
|
|
{
|
|
this.d = ev;
|
|
}
|
|
};
|
|
if (zx.f != 0) {
|
|
ieS2.e(zx.f);
|
|
}
|
|
}
|
|
}
|
|
return inflate;
|
|
}
|
|
|
|
@Override // o.cYV
|
|
public final void d(int i) {
|
|
this.errorIcon.setImageDrawable(getResources().getDrawable(i));
|
|
}
|
|
|
|
@Override // o.cYV
|
|
public final void b(String str) {
|
|
this.errorTitle.setText(str);
|
|
}
|
|
|
|
@Override // o.cYV
|
|
public final void c(String str) {
|
|
this.errorDescription.setText(str);
|
|
}
|
|
|
|
@Override // o.cYV
|
|
public final void e(String str) {
|
|
u(str);
|
|
}
|
|
|
|
@Override // o.cYV
|
|
public final void d() {
|
|
this.btContactUs.setVisibility(0);
|
|
}
|
|
|
|
@OnClick
|
|
public void onContactUsClick() {
|
|
startActivity(new Intent(getContext(), (Class<?>) ContactUsActivity.class));
|
|
}
|
|
}
|