I have a strange issue with submenus and android:checkableBehavior="single". It works fine if the menu is in action bar, but displays check boxes instead of radio buttons if menu is in the action mode. I use AppCompatActivity and create action mode with startActionMode().
menu xml:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/priority"
android:title="@string/priority"
app:showAsAction="ifRoom">
<menu>
<group android:checkableBehavior="single">
<item
android:id="@+id/low_priority"
android:title="@string/low_pririty"/>
<item
android:id="@+id/normal_priority"
android:title="@string/normal_priority"/>
<item
android:id="@+id/high_priority"
android:title="@string/high_priority"/>
</group>
</menu>
</item>
</menu>
How can I fix this?
You menu works fine for me using the
startSupportActionMode
method instead of thestartActionMode
method. ThestartActionMode
method should not be used when using the support libraryAppCompatActivity
.