0

I have been using actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); in my app but the target device is android 2.3.2 and does not support this code. Is there any solution to have actionbar and tabview in android 2.3?

4

3 回答 3

2

在 3.0 之前的版本中使用的解决方案ActionBar称为ActionBarSherlock,使您能够为用户提供跨 Android 版本的统一体验。

网站链接:ActionBarSherlock.com

实际上还有一个叫做ActionBarCompat在这里阅读更多),但它真的不如ActionBarSherlock.

编辑:您会在项目层次结构中找到很多有用的示例,但这可能是您想要完成的事情:TabNavigation.java

于 2013-07-03T06:46:56.690 回答
0

是的,ActionbarSherlock 是最好的方法。

这是如何添加它的链接

于 2013-07-03T06:55:33.187 回答