android - ActionBar shows either all actions or none, putting all into the overflow menu -


my app targets sdk 17, i'm testing android 4.x emulator (with support library , actionbarsherlock actionbar available android 2.x).

i've got 6 menu items 1 of activities. there 3 vital , need shown time. remaining 3 can in overflow menu, if there room 4th or 5th icon, want many showing possible.

my problem actionbar seems show or none. set android:showasaction="always" first 3 , android:showasaction="ifroom" last 3. however, shows none of them in actionbar, adds overflow menu action (three vertical dots) , shows 6 actions in overflow menu.

i've been iterating , testing, trying figure out how decides behave. if of 6 options have ifroom of them put overflow menu, seems stupid.

am doing wrong? how can of actions shown , have overflow menu... hold overflow?

<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" >      <group android:id="@+id/group" >         <item             android:id="@+id/add"             android:icon="@drawable/ic_menu_btn_add"             android:showasaction="always"             android:title="add"/>         <item             android:id="@+id/calculatenpv"             android:icon="@drawable/menu_icon_npv"             android:showasaction="always"             android:title="npv"/>         <item             android:id="@+id/calculateirr"             android:icon="@drawable/menu_icon_irr"             android:showasaction="always"             android:title="irr/yr"/>         <item             android:id="@+id/send"             android:icon="@drawable/content_email"             android:showasaction="always"             android:title="@string/share"/>         <item             android:id="@+id/graph"             android:icon="@drawable/ic_menu_gallery"             android:showasaction="always"             android:title="graph"/>         <item             android:id="@+id/deletereorder"             android:icon="@drawable/ic_menu_clear_playlist"             android:showasaction="always"             android:title="delete/reorder cashflows"/>         </group>  </menu> 

try getting rid of <group>. eminently possible <group> causes overflow behavior work on entire group rather individual items.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -