Slide tab bar like in android market
Solution 1
Thanks to Selvin for the response.
See as suggested: https://github.com/JakeWharton/Android-ViewPagerIndicator
or this for a quick tutorial: http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
Solution 2
Jake Wharton's Android-ViewPagerIndicator is a good option, but it doesn't support underline bar movement like below images(you can see what "underline bar movement" is as video at here).
I think Astuetz's PagerSlidingTabStrip is an another good option for this regard, since it gives more natural and interactive user experience.
This implementation is available at Github. See: https://github.com/astuetz/PagerSlidingTabStrip
Also you can download sample app at Play Store.
Noureddine AMRI
Experienced Software Engineer with a demonstrated history of working in the information technology and services industry. Skilled in web and mobile applications. Winner of multiple awards in mobile development.
Updated on June 07, 2022Comments
-
Noureddine AMRI almost 2 years
Does anyone know how to implement the bar like in android market (Categories, featured, top paid...) I've also seen it in the new version of SuperUser so i know it can be done. Thank you for your responses!
-
ralphgabb over 9 years"it doesn't support underline bar movement", is there's any way to support the underline movement using Jake Wharton's ?
-
김준호 over 9 years@ralphspoon AFAIK, there isn't. You can find it by checking their source code.
-
ralphgabb over 9 yearsyeah thanks, guess I'll stick with slidingtabstrip, thanks though :)
-
김준호 over 9 yearsAlso, I found a good "official" sample here, github.com/googlesamples/android-SlidingTabsColors.