use of com.shizhefei.view.indicator.RecyclerIndicatorView in project ViewPagerIndicator by LuckyJayce.
the class YearActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_year);
ViewPager viewPager = (ViewPager) findViewById(R.id.year_viewPager);
Indicator indicator = (RecyclerIndicatorView) findViewById(R.id.year_indicator);
int selectColorId = Color.parseColor("#f8f8f8");
int unSelectColorId = Color.parseColor("#010101");
indicator.setOnTransitionListener(new OnTransitionTextListener().setColor(selectColorId, unSelectColorId));
indicator.setScrollBar(new SpringBar(getApplicationContext(), Color.GRAY));
viewPager.setOffscreenPageLimit(4);
indicatorViewPager = new IndicatorViewPager(indicator, viewPager);
indicatorViewPager.setAdapter(new YearAdapter(1800, 10000000));
indicatorViewPager.setCurrentItem(2016 - 1800, false);
}
use of com.shizhefei.view.indicator.RecyclerIndicatorView in project ViewPagerIndicator by LuckyJayce.
the class SingleTabActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_singletab);
ScrollIndicatorView scrollIndicatorView = (ScrollIndicatorView) findViewById(R.id.singleTab_scrollIndicatorView);
FixedIndicatorView fixedIndicatorView = (FixedIndicatorView) findViewById(R.id.singleTab_fixedIndicatorView);
RecyclerIndicatorView recyclerIndicatorView = (RecyclerIndicatorView) findViewById(R.id.singleTab_reyclerIndicatorView);
set(scrollIndicatorView, 16);
set(fixedIndicatorView, 5);
set(recyclerIndicatorView, 10000);
}
Aggregations