Get ActionBarSherlock actionBarSize in Android 2.x

2019-03-19 13:11发布

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

2条回答
相关推荐>>
2楼-- · 2019-03-19 13:27

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

查看更多
趁早两清
3楼-- · 2019-03-19 13:37

This did the trick:

android:layout_height="@dimen/abs__action_bar_default_height"
查看更多
登录 后发表回答