android: How to make a tab flip like android marke

2019-02-07 05:23发布

问题:

i wanna rewrite my app to fragment api, TabHost is deprecated so i've found ViewPager, but how can i make a tabbar like android market? (android market use viewpager and a bar). Superuser 3 use this bar too

回答1:

Take a look at this guide: http://blog.stylingandroid.com/archives/537



回答2:

The technique is called "Swipey Tabs" and is described by Kirill Grouchnikov, a google user interface engineer, in this blog post.

Andreas Stütz has done a project to replicate the functionality called android-viewpagertabs. Other people have had a go too.



回答3:

i think you looking for the viewflipper class http://developer.android.com/reference/android/widget/ViewFlipper.html



回答4:

I'm unsure about Honeycomb, but in Ice Cream Sandwhich it happens automaticly when adding enough tabs to the actionbar.



回答5:

The guy who created ActionBarSherlock as a project for this type of functionality, called ViewPageIndicator. Here's the URL: http://viewpagerindicator.com/