romandanylyk / PageIndicatorView

An page indicator for Android ViewPager
4.62k stars 563 forks source link

How can we use PageIndicatorView without set a ViewPager to? #103

Open trietbui85 opened 5 years ago

trietbui85 commented 5 years ago

Sometimes a ViewPager is too much heavy for a simple scrollview with 2 or 3 screens, so I create a custom horizontal ScrollView instead (which scroll page by page). But, how we can use PageIndicatorView with such ScrollView?

romandanylyk commented 5 years ago

Hi @anticafe , you can still use PageIndicatorView in case you don't have a ViewPager. PageIndicatorView has list of public methods to control selected state, so you have to manage it programmatically when your selected page is changed. For example, call PageIndicatorView.setSelection(position); method to update new circle with selected state.