Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get ActionBarSherlock actionBarSize in Android 2.x

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

like image 732
Matt Avatar asked Jul 26 '12 15:07

Matt


2 Answers

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

like image 147
Jake Wharton Avatar answered Sep 30 '22 00:09

Jake Wharton


This did the trick:

android:layout_height="@dimen/abs__action_bar_default_height"
like image 20
Matt Avatar answered Sep 30 '22 01:09

Matt