Determine if action bar is split

actionbarsherlock, android, android-actionbar

Solution

If you are using ActionBarSherlock you can look for the boolean value abs__split_action_bar_is_narrow

Just create some static method where you can do

return ResourcesCompat.getResources_getBoolean(context,
                            R.bool.abs__split_action_bar_is_narrow);

you need to use the ResourcesCompat (from actionbarsherlock) class because pre 3.2 cant read folders with metrics (like values-sw480)

Problem

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:windowActionBarOverlay is true). More or less like the Google Maps app. Now I would like to push views on top of the map, at the bottom of the screen still keeping it above the bottom action bar. My problem here is that I don't know the height of the bottom action bar. Frankly, I can't even find a way to know if it's drawn or not. `getHeight()` seems to return the height of the top action bar (or perhaps it's the height of both of them but I still don't know if the bottom action bar exists or not. Please, tell me this information is right in front of my eyes!

Original source

Related problems