what-the-bank/sources/com/scb/phone/view/fragment/closeaccount/CloseAccountSelectionTabFra...

90 lines
3.0 KiB
Java

package com.scb.phone.view.fragment.closeaccount;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.google.android.material.tabs.TabLayout;
import com.scb.phone.R;
import o.C12153eso;
import o.C3553azi;
import o.InterfaceC12832fIg;
import o.InterfaceC13391fZD;
import o.InterfaceC9128ddq;
import o.ZI;
/* loaded from: classes5.dex */
public class CloseAccountSelectionTabFragment extends Hilt_CloseAccountSelectionTabFragment implements InterfaceC9128ddq, InterfaceC12832fIg {
private InterfaceC12832fIg d;
@InterfaceC13391fZD
public C3553azi presenter;
@BindView
TabLayout tabLayout;
@BindView
ViewPager viewPager;
public static CloseAccountSelectionTabFragment h() {
return new CloseAccountSelectionTabFragment();
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.scb.phone.view.fragment.closeaccount.Hilt_CloseAccountSelectionTabFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public void onAttach(Context context) {
if (getParentFragment() instanceof InterfaceC12832fIg) {
this.d = (InterfaceC12832fIg) getParentFragment();
} else if (context instanceof InterfaceC12832fIg) {
this.d = (InterfaceC12832fIg) context;
} else {
StringBuilder sb = new StringBuilder();
sb.append(context.toString());
sb.append(" must implement AccountTargetSelectionListener");
throw new ClassCastException(sb.toString());
}
super.onAttach(context);
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559960, viewGroup, false);
ButterKnife.c(this, inflate);
this.presenter.e((C3553azi) this);
C3553azi c3553azi = this.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.azk
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9128ddq) obj).d();
}
};
if (c3553azi.f != 0) {
ieS.e(c3553azi.f);
}
return inflate;
}
@Override // o.InterfaceC9128ddq
public final void d() {
this.viewPager.setAdapter(new C12153eso(getChildFragmentManager(), getResources()));
this.viewPager.setOffscreenPageLimit(2);
this.tabLayout.setupWithViewPager(this.viewPager);
this.viewPager.setCurrentItem(0);
}
@Override // o.InterfaceC12832fIg
public final void i() {
this.d.i();
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
this.presenter.w_();
super.onDestroy();
}
}