142 lines
5.3 KiB
Java
142 lines
5.3 KiB
Java
package com.scb.phone.view.fragment.gift;
|
|
|
|
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.scb.phone.R;
|
|
import com.scb.phone.view.adapter.gift.GiftMoneySelectThemeAdapter;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import me.relex.circleindicator.CircleIndicator;
|
|
import o.C14957gcv;
|
|
import o.WM;
|
|
import org.bouncycastle.asn1.x509.DisplayText;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class GiftMoneySelectThemeFragment extends Hilt_GiftMoneySelectThemeFragment {
|
|
public static final IeS c = new IeS(0);
|
|
public WM d;
|
|
private List<? extends WM> h;
|
|
private GiftMoneySelectThemeAdapter j;
|
|
|
|
@BindView
|
|
public CircleIndicator mCircleIndicator;
|
|
|
|
@BindView
|
|
public ViewPager mViewPager;
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
View inflate = layoutInflater.inflate(R.layout.2131559679, viewGroup, false);
|
|
((BaseFragment) this).a = ButterKnife.c(this, inflate);
|
|
return inflate;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onViewCreated(View view, Bundle bundle) {
|
|
ArrayList arrayList;
|
|
C14957gcv.e(view, "");
|
|
super.onViewCreated(view, bundle);
|
|
this.j = new GiftMoneySelectThemeAdapter(getContext());
|
|
Bundle arguments = getArguments();
|
|
CircleIndicator circleIndicator = null;
|
|
if (arguments != null) {
|
|
ArrayList parcelableArrayList = arguments.getParcelableArrayList("EXTRA_GIFT_MONEY_LIST");
|
|
ArrayList arrayList2 = parcelableArrayList instanceof List ? parcelableArrayList : null;
|
|
if (arrayList2 != null) {
|
|
this.h = arrayList2;
|
|
if (arrayList2 == null) {
|
|
C14957gcv.a("");
|
|
arrayList = null;
|
|
} else {
|
|
arrayList = arrayList2;
|
|
}
|
|
this.d = (WM) arrayList.get(0);
|
|
GiftMoneySelectThemeAdapter giftMoneySelectThemeAdapter = this.j;
|
|
if (giftMoneySelectThemeAdapter == null) {
|
|
C14957gcv.a("");
|
|
giftMoneySelectThemeAdapter = null;
|
|
}
|
|
C14957gcv.e(arrayList2, "");
|
|
giftMoneySelectThemeAdapter.d.clear();
|
|
giftMoneySelectThemeAdapter.d.addAll(arrayList2);
|
|
giftMoneySelectThemeAdapter.notifyDataSetChanged();
|
|
if (arrayList2.size() > 10) {
|
|
CircleIndicator circleIndicator2 = this.mCircleIndicator;
|
|
if (circleIndicator2 == null) {
|
|
C14957gcv.a("");
|
|
circleIndicator2 = null;
|
|
}
|
|
circleIndicator2.setVisibility(8);
|
|
} else {
|
|
CircleIndicator circleIndicator3 = this.mCircleIndicator;
|
|
if (circleIndicator3 == null) {
|
|
C14957gcv.a("");
|
|
circleIndicator3 = null;
|
|
}
|
|
circleIndicator3.setVisibility(0);
|
|
}
|
|
}
|
|
}
|
|
ViewPager viewPager = this.mViewPager;
|
|
if (viewPager == null) {
|
|
C14957gcv.a("");
|
|
viewPager = null;
|
|
}
|
|
GiftMoneySelectThemeAdapter giftMoneySelectThemeAdapter2 = this.j;
|
|
if (giftMoneySelectThemeAdapter2 == null) {
|
|
C14957gcv.a("");
|
|
giftMoneySelectThemeAdapter2 = null;
|
|
}
|
|
viewPager.setAdapter(giftMoneySelectThemeAdapter2);
|
|
viewPager.setPadding(DisplayText.DISPLAY_TEXT_MAXIMUM_SIZE, 0, DisplayText.DISPLAY_TEXT_MAXIMUM_SIZE, 0);
|
|
viewPager.setClipToPadding(false);
|
|
viewPager.setClipChildren(false);
|
|
viewPager.setOffscreenPageLimit(3);
|
|
CircleIndicator circleIndicator4 = this.mCircleIndicator;
|
|
if (circleIndicator4 != null) {
|
|
circleIndicator = circleIndicator4;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
circleIndicator.setViewPager(viewPager);
|
|
viewPager.addOnPageChangeListener(new HBt(this));
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class HBt extends ViewPager.jbe {
|
|
private GiftMoneySelectThemeFragment b;
|
|
|
|
HBt(GiftMoneySelectThemeFragment giftMoneySelectThemeFragment) {
|
|
this.b = giftMoneySelectThemeFragment;
|
|
}
|
|
|
|
@Override // androidx.viewpager.widget.ViewPager.jbe, androidx.viewpager.widget.ViewPager.ojQ
|
|
public final void onPageSelected(int i) {
|
|
GiftMoneySelectThemeFragment giftMoneySelectThemeFragment = this.b;
|
|
List list = giftMoneySelectThemeFragment.h;
|
|
if (list == null) {
|
|
C14957gcv.a("");
|
|
list = null;
|
|
}
|
|
giftMoneySelectThemeFragment.d = (WM) list.get(i);
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class IeS {
|
|
private IeS() {
|
|
}
|
|
|
|
public /* synthetic */ IeS(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
}
|