When we define a NavigationView with a section with submenu items. It aligns the subparagraphs with the section heading on the left:
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:title="Sub items"> <menu> <item android:title="Sub item 1" /> <item android:title="Sub item 2" /> </menu> </item> </menu>

I tried adding a transparent image with the correct size for the pad:
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:title="Sub items"> <menu> <item android:icon="@drawable/ic_transparent" android:title="Sub item 1" /> <item android:icon="@drawable/ic_transparent" android:title="Sub item 2" /> </menu> </item> </menu>

But by default NavigationView:
- Adds a fixed pad between the text icon
- Provides the size of the fixes to the icon itself
I could not find how to configure this add-on or icon size.
Question How can we change the indentation of a subheading so that the subparagraphs are more indented?
I prefer to do the cleanup using the attribute rather than pasting transparent images.
android material-design menu submenu
infinite loop
source share