9

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

Matt
  • 5,461
  • 7
  • 36
  • 43

2 Answers2

20

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

Jake Wharton
  • 75,598
  • 23
  • 223
  • 230
3

This did the trick:

android:layout_height="@dimen/abs__action_bar_default_height"
Matt
  • 5,461
  • 7
  • 36
  • 43
  • I had problems with @JakeWharton's answer but this did the trick for me. My problem was a "You must supply a layout_height attribute." RunTimeException – JohnnyLambada Mar 31 '14 at 20:24