I have a
<android.support.design.widget.NavigationView
app:menu="@menu/drawer"
/>
with the following menu items:
<item
android:id="@+id/main_item"
android:icon="@drawable/ic_menu_main"
android:title="@string/app_name"/>
<group
android:id="@+id/some_group"
android:checkableBehavior="single"/>
<item
android:id="@+id/teams_item"
android:icon="@drawable/ic_menu_teams"
android:title="@string/teams"/>
Now I want to add an item either to the some_group
or just below it.
I tried:
MenuItem mi = menu.add( R.id.soume_group, someId, NONE, "some name" );
or
MenuItem mi = menu.add( R.id.soume_group, someId, 2, "some name" );
but the items are added at the bottom of the menu.
How to fix my problem?
TIA