How to change the size of android item icon menu in the toolbar?

I want to change the width and height of the below image icon in tool bar:

Icon Toolbar

and this is the related app\src\main\res\menu\main.xml

<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android=""     xmlns:app="">      <item         android:id="@+id/action_favorite"         android:orderInCategory="300"         android:title="User"         android:icon="@drawable/filterr"         app:showAsAction="ifRoom"></item> </menu>  
Add Comment
1 Answer(s)

You can try with VectorDrawable. Vector images do not lose quality when they are scaled. A vector image can be scaled indefinitely.

<vector xmlns:android=""     android:height="24dp"     android:width="24dp" 

android:height – Used to define the intrinsic height the drawable.

android:width – Used to define the intrinsic width of the drawable.

Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.