当前位置: 动力学知识库 > 问答 > 编程问答 >

How to create a custom tabbar in android to look like an iphone tabbar?

问题描述:

Possible Duplicate:

Android - iphone style tabhost

I am trying to figure out how to achieve a tab bar look and feel like the one provided in the iOS for android applications? I am using the normal one but it makes my application to look old school. I would like to achieve the same visual experience as the image below:

http://www.android.com/market/data/screenshots/com.i2.android.brasileirao.activity0.png

I have also looked at mobyfactory-uiwidgets-android bu they are far from being equal to the one in the image.

Thanks T

网友答案:

There's nothing that says the TabHost in a tabbed layout needs to be above the tab content area, so feel free to stick it wherever. But please don't put tabs on the bottom just because you can; Android users aren't used to this and you need to have a better reason than "it looks old-school" for violating UX expectations.

If you just want to fix the look of individual tabs themeselves, you can use TabSpec's setContent(View v) method to setup a custom view for a tab. Also see the source code to the Google IO 2010 Schedule app. You can definitely spruce up tabs this way in lots of good ways without messing about with user's understandings of what Android tabs are and how they function.

分享给朋友:
您可能感兴趣的文章:
随机阅读: