I've the following ImageButton
:
<ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fireButton"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/ic_whatshot_48px"
android:tint="@color/accent"
style="?android:attr/borderlessButtonStyle"
android:scaleType="fitCenter"
android:onClick="fire" />
The ic_whatshot_48px
is a VectorDrawable
:
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:fillColor="#000000"
android:pathData="M27 1.34s1.48 5.3 1.48 9.6c0 4.12-2.7 7.47-6.83
7.47s-7.25-3.34-7.25-7.47l.05-.72C10.43 15.03 8 21.23 8 28c0 8.84 7.16 16 16
16s16-7.16 16-16c0-10.79-5.19-20.41-13-26.66zM23.42 38c-3.56
0-6.45-2.81-6.45-6.28 0-3.25 2.09-5.53 5.63-6.24s7.2-2.41 9.23-5.15c.78 2.58
1.19 5.3 1.19 8.07 0 5.29-4.3 9.6-9.6 9.6z" />
</vector>
But the image is scaled and is blured and ugly.
Why is that? It's VECTORDrawable
, it should be nice and smooth.