Search code examples
androidandroid-scrollbar

Android: how to show the user which view is active


I have an activity with a WebView. I would like to give the possibility to the user to scroll from one WebView to another WebView (as it's done to Android desktop):

image1

with something in the bottom which shows which screen is actually viewed. I have think about the ScrollView but maybe something else exists which easier to use.


Solution

  • what you want to use is the ViewPager http://android-developers.blogspot.de/2011/08/horizontal-view-swiping-with-viewpager.html

    To get an indicator which shows on what page the user is use: http://jakewharton.com/viewpagerindicator/

    An example how to use it is here: http://blog.stylingandroid.com/archives/537