Here is how to Resize Android Drawer Menu Items Size, Spacing etc

How to Resize Android Drawer Menu Items Size, Spacing between Menu Items etc

By default the android drawer menu items height and width are set by default configuration in android studio. If you need change it, you can use the code below.

The reason for me to change the height and spacing was i added dividers between each item in drawer menu and the gap between every item became too big. Adding this lines of code fixed it and you can also change sizes by altering the value in the related line.

Before Adding the Code

After Adding the Code

I changed icons before taking screen shot

XML Code to Change Navigation Drawer Items Spacing and Size

Just add this code in dimens.xml file inside res folder. That’s it

<dimen name="design_navigation_padding_top_default" tools:override="true">5dp</dimen>
<dimen name="design_navigation_separator_vertical_padding" tools:override="true">0dp</dimen>
<dimen name="design_navigation_padding_bottom" tools:override="true">5dp</dimen>
<dimen name="design_navigation_icon_size" tools:override="true">20dp</dimen>
<dimen name="design_navigation_icon_padding" tools:override="true">12dp</dimen>


Post navigation


This site uses Akismet to reduce spam. Learn how your comment data is processed.