![](/img/trans.png)
[英]How to make the ActionBar LayoutParams workable for the android 2.x devices
[英]How to gracefully support Android 2.x devices in apps that use the ActionBar?
我正在写一个应用程序,我想使用Android 3.x及更高版本中适用于Android的新ActionBar。 该应用程序仍需要支持大多数设备,并且大多数设备都在运行2.x版本。
我已经配置了项目,以便将minSdk设置为API 8,并将targetSDK设置为API 14。
我的问题是使用新的SDK功能(如ActionBar)并仍支持运行不支持此类功能的较早版本的Android的较旧设备的最佳实践是什么?
我建议使用ActionBarSherlock 。 除其他功能外,它为ICS ActionBar提供向后兼容性。
使用v7-appcompat支持库。
在这里检查: http : //developer.android.com/tools/support-library/features.html
进行设置: https : //developer.android.com/tools/support-library/setup.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.