use of me.relex.circleindicator.CircleIndicator in project CircleIndicator by ongakuer.
the class ChangeColorFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
ViewPager viewpager = (ViewPager) view.findViewById(R.id.viewpager);
CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
viewpager.setAdapter(new SamplePagerAdapter());
indicator.setViewPager(viewpager);
}
use of me.relex.circleindicator.CircleIndicator in project CircleIndicator by ongakuer.
the class DynamicAdapterFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
view.findViewById(R.id.add).setOnClickListener(this);
view.findViewById(R.id.remove).setOnClickListener(this);
mAdapter = new SamplePagerAdapter(1) {
@Override
public int getItemPosition(Object object) {
return POSITION_NONE;
}
};
ViewPager viewpager = (ViewPager) view.findViewById(R.id.viewpager);
CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
viewpager.setAdapter(mAdapter);
indicator.setViewPager(viewpager);
mAdapter.registerDataSetObserver(indicator.getDataSetObserver());
}
Aggregations