[英]use actionbar in android 2.3 programming
I have been using actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS)
; 我一直在使用
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS)
; in my app but the target device is android 2.3.2 and does not support this code. 在我的应用程序但目标设备是Android 2.3.2并且不支持此代码。 Is there any solution to have actionbar and tabview in android 2.3?
有什么解决方案在android 2.3中有actionbar和tabview吗?
The solution for getting using the ActionBar
in versions prior to 3.0 is called ActionBarSherlock
, and enables you to give the user a unified experience across the Android versions. 在3.0之前的版本中使用
ActionBar
的解决方案称为ActionBarSherlock
,使您能够为用户提供跨Android版本的统一体验。
Link to the website: ActionBarSherlock.com 链接到网站: ActionBarSherlock.com
There's actually also something called ActionBarCompat
( read more here ), but it's really inferior to ActionBarSherlock
. 实际上还有一些名为
ActionBarCompat
东西( 在这里阅读更多内容 ),但它确实不如ActionBarSherlock
。
Edit: You'll find a lot of useful samples within the project hierarchy, but this should probably be the thing you're looking to accomplish: TabNavigation.java 编辑:您将在项目层次结构中找到许多有用的示例,但这应该是您要完成的事情: TabNavigation.java
使用ActionbarSherlock: http://actionbarsherlock.com/下面是使用卡口与ActionbarSherlock教程: http://www.androidbegin.com/tutorial/implementing-actionbarsherlock-fragment-tabs-in-android/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.