Android NavigationView: reduce space between icon and text and `itemBackground` not working

后端 未结 6 1085
情话喂你
情话喂你 2020-12-05 19:29

Is there a way to reduce the space between the icon and text in the NavigationView when its built using a menu xml?

I\'ve tried to text android:drawablePadding

6条回答
  •  猫巷女王i
    2020-12-05 19:53

    With the NavigationView defined in the Material Components Library use the app:itemIconPadding attribute.

    
    

    You can also define a custom style like:

      
    

    The default value is defined by the @dimen/mtrl_navigation_item_icon_padding and it is 14dp.

提交回复
热议问题