Determine if action bar is split

前端 未结 3 712
-上瘾入骨i
-上瘾入骨i 2021-01-11 23:31

I have a MapView with an action bar powered by ActionBarSherlock. The action bar is both split (on \"narrow\" screens) and overlayed / semi-transparent (android

3条回答
  •  悲哀的现实
    2021-01-11 23:38

    The bottom bar should match the height of the regular action bar. Thus, using ?android:attr/actionBarSize (or in ActionBarSherlock's case ?attr/actionBarSize) for the height in XML or getResources().getDimensionPixelSize(R.attr.actionBarSize) in code should suffice.

    edit:

    Er, on a second read of your question it seems more focused on also determining whether or not the split action bar exists.

    You may want to read these answers and the follow-up comments by Adam Powell, action bar guru:

    • https://stackoverflow.com/a/8280776/132047
    • https://stackoverflow.com/a/8381191/132047

提交回复
热议问题