How to change the size of menu item icon in NavigationView?
You can change the size of navigationView icon by overriding design_navigation_icon_size
attribute. You can put it in dimens and because you're overriding a private attribute, you need to include tools:override="true"
<dimen name="design_navigation_icon_size" tools:override="true">40dp</dimen>
Got Solution
Make Below entry in dimens.
<dimen name="design_navigation_icon_size">48dp</dimen>
The main thing that decide the icon's size is the dimension:navigation_icon_size
, have a look at the NavigationMenuItemView
class:
public NavigationMenuItemView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); this.mIconSize = context.getResources().getDimensionPixelSize(dimen.navigation_icon_size);}
so, we can just overide the property in our dimens file.
For example:
<dimen name="navigation_icon_size">48dp</dimen>
add that code in the dimens file, and you can find it's size changed.
Before:
After: