Android menu item is not available after "scrolling"

I got into (imho) strange behavior regarding android menu.

Problem:

When you place your finger on the drop-down menu item (which is the parent of a submenu / group) and swipe down, select an option and release your finger, everything will be fine.

BUT after which you cannot press the menu item again .

What do I have:

This is how it looks inside the application:

enter image description here

1. The menu is registered as follows:

 public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        ...
}

      

2. The style for the menu looks something like this: (The group does not seem to be directly responsible)

<menu xmlns:android="http://schemas.android.com/apk/res/android">
...
<item ... >
    <menu>
        <group android:checkableBehavior="single">
            <item
                android:id="@+id/menu_fuelTypeDiesel" />
            <item
                android:id="@+id/menu_fuelTypeE5" />
            <item
                android:id="@+id/menu_fuelTypeE10" />
        </group>
    </menu>
</item>
...
</menu>

      

3. OnOptionsItemSelected-Listener with a switch-case statement containing something like the following:

 case R.id.menu_fuelTypeDiesel:
                someMethod(item);
                break;

      

Where someMethod calls item.setChecked (true); and some unimportant things.

What's interesting: When you select a different menu that was not shown on the ActionBar, you can press Drop again.

I'm guessing this is some kind of bug in Android?

+3


source to share


1 answer


This seems to be a bug in KitKat.



There is an issue in Google Code: https://code.google.com/p/android/issues/detail?id=69205

+1


source







All Articles