140 lines
4.2 KiB
Java
140 lines
4.2 KiB
Java
package com.scb.phone.view.adapter.accountsummary;
|
|
|
|
import android.content.Context;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import androidx.appcompat.widget.AppCompatTextView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import com.scb.phone.R;
|
|
import o.C0693Mj;
|
|
import o.WYJ;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class ErrorPagerAdapter extends WYJ {
|
|
private C0693Mj a;
|
|
private LayoutInflater b;
|
|
private View.OnClickListener d;
|
|
private LWm e;
|
|
|
|
@BindView
|
|
AppCompatTextView message;
|
|
|
|
@BindView
|
|
AppCompatTextView title;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public enum LWm {
|
|
ACCOUNT_SUMMARY_ERROR,
|
|
DEBIT_SUMMARY_ERROR,
|
|
WARNING_ERROR,
|
|
AUTO_RESIZE_MESSAGE_ERROR,
|
|
NORMAL_ERROR
|
|
}
|
|
|
|
@Override // o.WYJ
|
|
public int getCount() {
|
|
return 1;
|
|
}
|
|
|
|
@Override // o.WYJ
|
|
public boolean isViewFromObject(View view, Object obj) {
|
|
return view == obj;
|
|
}
|
|
|
|
public ErrorPagerAdapter(Context context) {
|
|
this.e = LWm.NORMAL_ERROR;
|
|
this.b = (LayoutInflater) context.getSystemService("layout_inflater");
|
|
this.a = null;
|
|
}
|
|
|
|
public ErrorPagerAdapter(Context context, LWm lWm) {
|
|
this.e = LWm.NORMAL_ERROR;
|
|
this.b = (LayoutInflater) context.getSystemService("layout_inflater");
|
|
this.a = null;
|
|
this.e = lWm;
|
|
}
|
|
|
|
public ErrorPagerAdapter(Context context, LWm lWm, View.OnClickListener onClickListener) {
|
|
this.e = LWm.NORMAL_ERROR;
|
|
this.b = (LayoutInflater) context.getSystemService("layout_inflater");
|
|
this.a = null;
|
|
this.e = lWm;
|
|
this.d = onClickListener;
|
|
}
|
|
|
|
public ErrorPagerAdapter(Context context, C0693Mj c0693Mj, LWm lWm, View.OnClickListener onClickListener) {
|
|
this.e = LWm.NORMAL_ERROR;
|
|
this.b = (LayoutInflater) context.getSystemService("layout_inflater");
|
|
this.a = c0693Mj;
|
|
this.e = lWm;
|
|
this.d = onClickListener;
|
|
}
|
|
|
|
@Override // o.WYJ
|
|
public void destroyItem(ViewGroup viewGroup, int i, Object obj) {
|
|
viewGroup.removeView((View) obj);
|
|
}
|
|
|
|
/* renamed from: com.scb.phone.view.adapter.accountsummary.ErrorPagerAdapter$5, reason: invalid class name */
|
|
/* loaded from: classes5.dex */
|
|
static /* synthetic */ class AnonymousClass5 {
|
|
static final int[] c;
|
|
|
|
static {
|
|
int[] iArr = new int[LWm.values().length];
|
|
c = iArr;
|
|
try {
|
|
iArr[LWm.ACCOUNT_SUMMARY_ERROR.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
c[LWm.DEBIT_SUMMARY_ERROR.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
c[LWm.WARNING_ERROR.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
c[LWm.AUTO_RESIZE_MESSAGE_ERROR.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
try {
|
|
c[LWm.NORMAL_ERROR.ordinal()] = 5;
|
|
} catch (NoSuchFieldError unused5) {
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // o.WYJ
|
|
public Object instantiateItem(ViewGroup viewGroup, int i) {
|
|
View inflate;
|
|
int i2 = AnonymousClass5.c[this.e.ordinal()];
|
|
if (i2 == 1) {
|
|
inflate = this.b.inflate(R.layout.2131559016, (ViewGroup) null);
|
|
} else if (i2 == 2) {
|
|
inflate = this.b.inflate(R.layout.2131559017, (ViewGroup) null);
|
|
} else if (i2 == 3) {
|
|
inflate = this.b.inflate(R.layout.2131559018, (ViewGroup) null);
|
|
} else if (i2 == 4) {
|
|
inflate = this.b.inflate(R.layout.2131559014, (ViewGroup) null);
|
|
} else {
|
|
inflate = this.b.inflate(R.layout.2131559015, (ViewGroup) null);
|
|
}
|
|
ButterKnife.c(this, inflate);
|
|
C0693Mj c0693Mj = this.a;
|
|
if (c0693Mj != null) {
|
|
this.title.setText(c0693Mj.d);
|
|
this.message.setText(this.a.c);
|
|
}
|
|
viewGroup.addView(inflate, 0);
|
|
View.OnClickListener onClickListener = this.d;
|
|
if (onClickListener != null) {
|
|
inflate.setOnClickListener(onClickListener);
|
|
}
|
|
return inflate;
|
|
}
|
|
}
|