I am trying to add the checkbox to menu of my Android app. But I don't know why item with android:checkable="true"
attribute has this square of checkbox, but behave like others items. Do I have to write something in java code? I can read the value but tapping does not changing it's value...
My menu\main.xml:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://ift.tt/nIICcg" >
<item
android:id="@+id/menu_settings"
android:title="@string/settings"/>
<item
android:id="@+id/menu_tests"
android:title="@string/i_want_to_test"/>
<item
android:id="@+id/menu_translating"
android:enabled="false"
android:title="@string/i_want_to_translating"/>
<item
android:id="@+id/menu_funmade"
android:checkable="true"
android:title="Enable funmade"/>
</menu>
Look:
The last option behve like other with no specified behaviour. I can tap and manu closes and state does not change. Hope you can help.
Andret
Aucun commentaire:
Enregistrer un commentaire