How I can remove the unnecessary top padding of the Navigation view?

Ahmed Talaat picture Ahmed Talaat · Jun 2, 2015 · Viewed 18.8k times · Source

There's an unnecessary top padding between the header and the first item shown in this picture.

enter image description here

How it can be removed?

you can find the source code here: https://github.com/chrisbanes/cheesesquare

Answer

Uğur Tılıkoğlu picture Uğur Tılıkoğlu · Dec 30, 2015

You can override predefined dimensions at your dimens.xml as;

<dimen name="design_navigation_padding_top_default" tools:override="true">0dp</dimen>
<dimen name="design_navigation_separator_vertical_padding" tools:override="true">0dp</dimen>
<dimen name="design_navigation_padding_bottom" tools:override="true">0dp</dimen>

Other possible values are here: https://github.com/android/platform_frameworks_support/blob/master/design/res/values/dimens.xml