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/