Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

ActionBar collapseActionView shows as ContextMenu instead of PopupMenu #655

Closed
TheNephilim88 opened this issue Oct 3, 2013 · 1 comment

Comments

@TheNephilim88
Copy link

On my Android 2.3.3-based test device I get a wrong behaviour of "collapseActionView" when inflating menu to ActionBar.

Menu-XML:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:holo="http://schemas.android.com/apk/res-auto">
    <item android:id="@+id/menu_collapsed"
          android:title="collapsed"
          holo:showAsAction="always|collapseActionView" >
        <menu>
            <item android:id="@+id/menu1"
                  android:title="menu1"
                  holo:showAsAction="always"
                  android:showAsAction="always" >
            </item>
            <item android:id="@+id/menu2"
                  android:title="menu2"
                  holo:showAsAction="always"
                  android:showAsAction="always" >
            </item>
            <item android:id="@+id/menu3"
                  android:title="menu3"
                  holo:showAsAction="always"
                  android:showAsAction="always" >
            </item>
        </menu>
    </item>
</menu>

Adding this menu to ActionBar:

@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_collapsed, menu);
        return true;
    }

Thats how it looks on Android 2.3.3:
device-2013-10-03-130132

Thats how it looks on Android 4.3:
device-2013-10-03-130154

@Prototik
Copy link
Owner

Prototik commented Nov 2, 2013

It's bug (?) in ABC, in ActionMenuPresenter using MenuDialogHelper instead MenuPopupHelper.
device-2013-11-02-122557

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants