use of net.lucode.hackware.magicindicator.buildins.circlenavigator.CircleNavigator in project MagicIndicator by hackware1993.
the class CustomNavigatorExampleActivity method initMagicIndicator2.
private void initMagicIndicator2() {
MagicIndicator magicIndicator = (MagicIndicator) findViewById(R.id.magic_indicator2);
CircleNavigator circleNavigator = new CircleNavigator(this);
circleNavigator.setFollowTouch(false);
circleNavigator.setCircleCount(CHANNELS.length);
circleNavigator.setCircleColor(Color.RED);
circleNavigator.setCircleClickListener(new CircleNavigator.OnCircleClickListener() {
@Override
public void onClick(int index) {
mViewPager.setCurrentItem(index);
}
});
magicIndicator.setNavigator(circleNavigator);
ViewPagerHelper.bind(magicIndicator, mViewPager);
}
use of net.lucode.hackware.magicindicator.buildins.circlenavigator.CircleNavigator in project MagicIndicator by hackware1993.
the class CustomNavigatorExampleActivity method initMagicIndicator1.
private void initMagicIndicator1() {
MagicIndicator magicIndicator = (MagicIndicator) findViewById(R.id.magic_indicator1);
CircleNavigator circleNavigator = new CircleNavigator(this);
circleNavigator.setCircleCount(CHANNELS.length);
circleNavigator.setCircleColor(Color.RED);
circleNavigator.setCircleClickListener(new CircleNavigator.OnCircleClickListener() {
@Override
public void onClick(int index) {
mViewPager.setCurrentItem(index);
}
});
magicIndicator.setNavigator(circleNavigator);
ViewPagerHelper.bind(magicIndicator, mViewPager);
}
Aggregations