When we define a NavigationView with a section with sub menu items. It left aligns the sub items with the section title:
<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 to 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 the NavigationView:
- Adds a fixed padding between the icon the text
- Enforces a fixes size on the icon itself
I could not find how to configure this padding nor the icon size.
Question How can we change the sub item indentation so that the sub items are more indented?
I prefer to do it cleaning via an attribute rather than inserting transparent images.