2016-06-23 19 views
1

Dort TextView und ich möchte ihn VectorDrawable Hintergrund tun. Ich mache vector.xmlAndroid: Vektor hat Unschärfe auf Android 4.4

<vector android:height="24dp" android:viewportHeight="114.0" 
    android:viewportWidth="494.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> 
    <path android:fillColor="#FFFFFF" 
     android:pathData="M12,86.61L2.19,76.51L12,67.18L12,8C12,3.58 15.59,0 20.01,0L483.99,0C488.42,0 492,3.58 492,8L492,102C492,106.42 488.41,110 483.99,110L20.01,110C15.58,110 12,106.42 12,102L12,86.61Z" 
     android:strokeColor="#00000000" android:strokeWidth="1"/> 
</vector> 

und diese VectorDrawable auf Android 4.4 eine unscharfe Kante (nicht klar), aber auf Android 5.0+ alles sieht gut aus (je nach Bedarf).

Hilfe das Problem mit Android 4.4

Antwort

0

Verwendung dieses lösen, wenn Image mit

<ImageView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    app:srcCompat="@drawable/ic_add" /> <- This may help 

Vector Drawables sind auch in Fällen wie TextView's drawableLeft Eigenschaft unterstützt

(mit benutzerdefinierten Textview Vektor zu handhaben für PreLollipop-Version).

Verwandte Themen