I want to know if there is a way to tell the design support navigation drawer to only mark one item as selected, when I have sub-items which contain more items.
Code:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
<item
android:id="@+id/nav_1"
android:icon="@drawable/ic_icon"
android:title="Item 1"
android:checked="true"/>
<item
android:id="@+id/nav_2"
android:icon="@drawable/ic_icon"
android:title="Item 2" />
</group>
<item android:title="Subtitle 1">
<menu>
<item
android:id="@+id/nav_2"
android:icon="@drawable/ic_icon"
android:title="Item 3" />
<item
android:id="@+id/nav_4"
android:icon="@drawable/ic_icon"
android:title="Item 4" />
<item
android:id="@+id/nav_5"
android:icon="@drawable/ic_icon"
android:title="Item 5" />
</menu>
</item>
</menu>
I have Item 1
selected by default and it is the first fragment that appears when launching the app. When I press on an item in a subtitle, Item 5
for example, Item 1
still has the darker background and is colored in the accent color, while Item 5
is only colored in the accent color without the dark background. How can I archive that only one items gets marked at one time?