![](/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.