what-the-bank/sources/com/scb/phone/view/fragment/accountsummary/BaseCardFragment.java

134 lines
4.6 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.accountsummary;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.adapter.accountsummary.ErrorPagerAdapter;
import com.scb.phone.view.custom.accountsummary.BaseAdBannerView;
import com.scb.phone.view.custom.accountsummary.ImageAdBannerView;
import com.scb.phone.view.custom.accountsummary.ImageAndTextAdBannerView;
import com.scb.phone.view.fragment.BaseFragment;
import java.util.List;
import me.relex.circleindicator.CircleIndicator;
import o.C0375Fe;
import o.C12028eqV;
import o.C14957gcv;
import o.C17764zak;
import o.EQ;
import o.EnumC0378Fg;
import o.InterfaceC6627cYe;
import o.WYJ;
import o.fHO;
import o.fSJ;
import o.guQ;
/* loaded from: classes5.dex */
public class BaseCardFragment extends BaseFragment implements InterfaceC6627cYe.HBt {
@BindView
FrameLayout bannerContainer;
ErrorPagerAdapter c;
protected fSJ d;
protected fSJ j;
@BindView
CircleIndicator mCircleIndicator;
@BindView
RelativeLayout mParentLayout;
@BindView
ViewPager mViewPager;
@Override // com.scb.phone.view.fragment.BaseFragment, o.InterfaceC6638cYp
public void v() {
e(new C12028eqV(getContext()));
}
@Override // o.InterfaceC6627cYe.HBt
public void aM_() {
ErrorPagerAdapter errorPagerAdapter = new ErrorPagerAdapter(getContext(), ErrorPagerAdapter.LWm.ACCOUNT_SUMMARY_ERROR);
this.c = errorPagerAdapter;
e(errorPagerAdapter);
}
/* JADX INFO: Access modifiers changed from: protected */
public final void e(WYJ wyj) {
this.mViewPager.setAdapter(wyj);
this.mViewPager.setClipToPadding(false);
this.mViewPager.setPadding(getResources().getDimensionPixelOffset(R.dimen.f28542131166620), 0, getResources().getDimensionPixelOffset(R.dimen.f28542131166620), 0);
this.mCircleIndicator.setViewPager(this.mViewPager);
}
/* JADX INFO: Access modifiers changed from: protected */
public final void b(List<? extends EQ> list) {
this.mCircleIndicator.setViewPager(this.mViewPager);
if (list.size() >= 10) {
this.mCircleIndicator.setVisibility(8);
} else {
this.mCircleIndicator.setVisibility(0);
}
}
/* JADX INFO: Access modifiers changed from: protected */
public final void d(String str, String str2) {
if (this.bannerContainer != null) {
C17764zak.HBt hBt = C17764zak.CREATOR;
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
g(C17764zak.HBt.d(str, str2, C17764zak.HBt.IeS.CLOSE));
this.bannerContainer.removeAllViews();
this.bannerContainer.setVisibility(8);
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
fSJ fsj = this.d;
if (fsj != null && !fsj.isDisposed()) {
this.d.dispose();
}
fSJ fsj2 = this.j;
if (fsj2 != null && !fsj2.isDisposed()) {
this.j.dispose();
}
super.onDestroy();
}
/* JADX INFO: Access modifiers changed from: protected */
public final void e(String str) {
try {
Intent intent = new Intent(CommonConstant.ACTION.HWID_SCHEME_URL);
intent.setData(Uri.parse(str));
intent.setFlags(603979776);
startActivity(intent);
} catch (ActivityNotFoundException | NullPointerException e) {
guQ.e(e);
}
}
/* JADX INFO: Access modifiers changed from: protected */
public final void a(C0375Fe c0375Fe, fHO fho) {
BaseAdBannerView imageAndTextAdBannerView;
if (this.bannerContainer != null) {
if (c0375Fe.i == EnumC0378Fg.IMAGE) {
imageAndTextAdBannerView = new ImageAdBannerView(getContext());
} else {
imageAndTextAdBannerView = new ImageAndTextAdBannerView(getContext());
}
this.bannerContainer.removeAllViews();
imageAndTextAdBannerView.setId(c0375Fe.b.hashCode());
imageAndTextAdBannerView.setDisplay(c0375Fe);
imageAndTextAdBannerView.setContextualBannerListener(fho);
this.bannerContainer.setVisibility(0);
this.bannerContainer.addView(imageAndTextAdBannerView);
}
}
}