Reputation: 2449
I want to change the width and height of the below image icon in tool bar:
and this is the related app\src\main\res\menu\main.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_favorite"
android:orderInCategory="300"
android:title="User"
android:icon="@drawable/filterr"
app:showAsAction="ifRoom"></item>
</menu>
Upvotes: 0
Views: 284
Reputation: 75778
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="http://schemas.android.com/apk/res/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.
Upvotes: 1