Get ActionBarSherlock actionBarSize in Android 2.x

喜欢而已 提交于 2019-12-03 17:39:14

问题


I am using ActionBarSherlock, and this XML line crashes in Android 2.x:

android:layout_height="?android:attr/actionBarSize"

Is there a way to get the ActionBarSize for ABS? Something like this maybe:

?android:attr/actionBarSherlockSize

Thanks


回答1:


Use ?attr/actionBarSize which will work on all API levels.




回答2:


This did the trick:

android:layout_height="@dimen/abs__action_bar_default_height"


来源:https://stackoverflow.com/questions/11672599/get-actionbarsherlock-actionbarsize-in-android-2-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!