How does splitActionBarWhenNarrow exactly work in Android?

Android docs describes splitActionBarWhenNarrow as follows: Msgstr "Add a panel at the bottom of the screen to display action elements in the ActionBar if they are limited for horizontal space (for example, in portrait mode on the handset).

But how is “horizontal space constraint” defined? There seems to be no way to determine when this split occurs.

+3
source share
1 answer

I am using ActionBarSherlock, and the action bar is split when the screen width is below 480dp. This behavior is determined by the following two resource files:

RES / values-w480dp / abs_bools.xml

<resources> <bool name="abs__action_bar_embed_tabs">true</bool> <bool name="abs__split_action_bar_is_narrow">false</bool> </resources> 

RES / values ​​/ abs_bools.xml

 <resources> <bool name="abs__action_bar_embed_tabs">false</bool> <bool name="abs__split_action_bar_is_narrow">true</bool> </resources> 

I have not tested whether this is the same behavior as in the ICS code, but I am sure that it is.

+2
source

All Articles