jaumard
jaumard

Reputation: 8292

ActionBarSherlock not show all menuItem under android 2.x

I have some issue with ActionBarSherlock

On android 4 it's ok : On android 4 it's ok

But on android 2.3 enter image description here

One option is missing !!! And submenu was not show to show this option.

This is how i create the menu:

 @Override
public boolean onCreateOptionsMenu(Menu menu) {

    menu.add("Controls")
        .setIcon(R.drawable.ic_launcher)
        .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
    menu.add("Theme")
    .setIcon(R.drawable.ic_launcher)
        .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
    menu.add("Advanced")
    .setIcon(R.drawable.ic_launcher)
    .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
    menu.add("Profils")
    .setIcon(R.drawable.ic_launcher)
    .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
    menu.add("Save")
    .setIcon(R.drawable.ic_launcher)
    .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);

    return true;
}

How can i fix this ?

Upvotes: 0

Views: 967

Answers (1)

codinguser
codinguser

Reputation: 5572

On devices with a hardware Menu button, you need to press the hardware Menu button in order to view overflow options. The soft menu button is only available on devices without hardware buttons.

Upvotes: 5

Related Questions