As said in the title, I'm trying to create a submenu inside the standard Navigation View menu. But I want it to be expandable and material designed.
<group android:checkableBehavior="single">
<item
android:id="@+id/inbox"
android:checked="false"
android:icon="@drawable/ic_inbox"
android:title="@string/inbox_string" />
<item
android:title="Submenu title">
<menu>
<item
android:id="@+id/menuSortNewest"
android:title="Sort by newest" />
<item
android:id="@+id/menuSortRating"
android:title="Sort by rating" />
</menu>
</item>
</group>
This way I only obtain an header, without dropdown. Any ideas on how to it?
As @Kris-larson said in comment, NavigationView only supports a single level menu, to have an expandable submenus you need a custom navigation drawer coded, my suggestion is MaterialDrawer library, a flexible and easy to use drawer library for your project.
Happy coding!