My xml code is:
-
-
Use:
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
You just need to add unique IDs to each of the group
items in the xml file.
<group
android:id="@+id/menuGroup_1" <!-- Here -->
android:checkableBehavior="single">
<item android:id="@+id/group_1_box_1"/>
<item android:id="@+id/group_1_box_2"/>
</group>
<group
android:id="@+id/menuGroup_2" <!-- And here -->
android:checkableBehavior="single">
<item android:id="@+id/group_2_box_1"/>
<item android:id="@+id/group_2_box_2"/>
</group>