问题
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