app:srcCompat在Android 6.0上显示不良

时间:2016-12-05 07:12:37

标签: android android-drawable

请查看图片

enter image description here

我使用app:srcCompat将一个矢量drawable插入到ImageView中,它在Android 6.0上显示效果不错但在Android 6.0上显示不好。

这是xml布局代码:

<android.support.v7.widget.AppCompatImageView
                android:layout_width="match_parent"
                android:layout_height="136dp"
                android:layout_gravity="center_horizontal"
                android:layout_weight="0.20"
                tools:ignore="MissingPrefix"
                app:srcCompat="@drawable/iaccess_logo" />

这是可绘制的xml:

<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="768.65dp"
    android:height="317.66dp"
    android:viewportWidth="768.65"
    android:viewportHeight="317.66">

    <path
        android:fillColor="#282828"
        android:pathData="M330.4,188.46a55.47,55.47,0,0,0-17.23-12.06,52.73,52.73,0,0,0-20.67-4.13,56.76,56.76,0,0,0-44.1,19.29,63.6,63.6,0,0,0-12.06,20.33,74.43,74.43,0,0,0,0,48.92,60.08,60.08,0,0,0,12.06,20.33,54.94,54.94,0,0,0,18.95,13.78,58.59,58.59,0,0,0,25.15,5.17,62.9,62.9,0,0,0,21-3.79,47.59,47.59,0,0,0,17.92-11l4.13,4.13a54.36,54.36,0,0,1-20,12.4,77.53,77.53,0,0,1-23.43,3.79,66.26,66.26,0,0,1-26.53-5.17,68.34,68.34,0,0,1-21-14.13,64.79,64.79,0,0,1-13.78-21.71C227.39,256,226,246.68,226,236.69a81.84,81.84,0,0,1,4.82-27.91,68.41,68.41,0,0,1,13.78-22,63.69,63.69,0,0,1,21-14.47,66.26,66.26,0,0,1,26.53-5.17,62,62,0,0,1,23.77,4.48,57.14,57.14,0,0,1,19.29,12.75Z" />
    <path
        android:fillColor="#282828"
        android:pathData="M444.1,188.46a55.47,55.47,0,0,0-17.23-12.06,52.73,52.73,0,0,0-20.67-4.13,56.76,56.76,0,0,0-44.1,19.29A63.6,63.6,0,0,0,350,211.89a74.43,74.43,0,0,0,0,48.92,60.08,60.08,0,0,0,12.06,20.33,54.94,54.94,0,0,0,18.95,13.78,58.59,58.59,0,0,0,25.15,5.17,62.9,62.9,0,0,0,21-3.79,47.59,47.59,0,0,0,17.92-11l4.13,4.13a54.36,54.36,0,0,1-20,12.4,77.53,77.53,0,0,1-23.43,3.79,66.26,66.26,0,0,1-26.53-5.17,68.34,68.34,0,0,1-21-14.13,64.79,64.79,0,0,1-13.78-21.71c-3.45-8.61-4.82-17.92-4.82-27.91a81.84,81.84,0,0,1,4.82-27.91,68.41,68.41,0,0,1,13.78-22,63.69,63.69,0,0,1,21-14.47,66.26,66.26,0,0,1,26.53-5.17,62,62,0,0,1,23.77,4.48,57.14,57.14,0,0,1,19.29,12.75Z" />
    <path
        android:fillColor="#282828"
        android:pathData="M569.85,229.46A72.61,72.61,0,0,0,565.37,206,53.11,53.11,0,0,0,554,188.11a48,48,0,0,0-16.88-11.71,57.13,57.13,0,0,0-22-4.13c-10,0-18.26,2.07-25.15,6.2s-12.75,9-17.23,15.16a60,60,0,0,0-9.65,18.6,58.92,58.92,0,0,0-3.1,17.23H569.85ZM459.26,235a77.18,77.18,0,0,0,3.45,23.43,63.75,63.75,0,0,0,10.68,21,55,55,0,0,0,18.26,14.81c7.24,3.79,16.19,5.51,26.18,5.51,10.34,0,19.29-2.07,27.22-6.2a59.89,59.89,0,0,0,20.67-17.92l4.48,4.13c-6.55,8.27-14.13,14.81-22.74,18.95-8.61,4.48-18.6,6.55-30,6.55A66.26,66.26,0,0,1,491,300.09a62.28,62.28,0,0,1-20.67-14.47,63.73,63.73,0,0,1-13.44-22.39A83.84,83.84,0,0,1,452,235a76.5,76.5,0,0,1,4.82-27.22A68.94,68.94,0,0,1,469.94,186a57.27,57.27,0,0,1,19.64-14.13A58.54,58.54,0,0,1,514,167.1c10.34,0,19.29,1.72,26.87,5.51a55.79,55.79,0,0,1,18.95,14.13,60.31,60.31,0,0,1,11.37,20A74.9,74.9,0,0,1,575,229.46V235H459.26Z" />
    <path
        android:fillColor="#282828"
        android:pathData="M673.21,267.7a34.5,34.5,0,0,1-3.45,15.85,38.88,38.88,0,0,1-9.3,11.71A41.9,41.9,0,0,1,647,302.5a51.93,51.93,0,0,1-16.54,2.41,59.46,59.46,0,0,1-26.18-5.51A49.22,49.22,0,0,1,585,283.2l5.17-3.45c9.3,13.09,23.08,20,41,20a42.79,42.79,0,0,0,12.75-2.07,46.61,46.61,0,0,0,11.71-5.86,34.77,34.77,0,0,0,8.61-10,30,30,0,0,0,3.1-13.78c0-6.2-1.38-11-4.13-14.81a28.7,28.7,0,0,0-10.34-9,54.87,54.87,0,0,0-13.78-5.51c-5.17-1.38-9.65-2.76-14.13-3.79a122.75,122.75,0,0,1-13.44-4.48,48.32,48.32,0,0,1-11-6.2,25.48,25.48,0,0,1-7.24-9.65,34.38,34.38,0,0,1-2.76-14.13c0-5.51,1-10.68,3.45-14.81a32.44,32.44,0,0,1,9-10.34,41.75,41.75,0,0,1,13.09-6.2,52.45,52.45,0,0,1,14.47-2.07c17.92,0,31,6.2,40,18.95l-5.51,3.1c-4.48-5.51-9.3-10-14.81-12.75s-12.06-4.13-20-4.13a46.4,46.4,0,0,0-11.37,1.38,31.66,31.66,0,0,0-11,4.82,24.75,24.75,0,0,0-8.27,8.61c-2.07,3.45-3.1,7.92-3.1,13.09A31.58,31.58,0,0,0,599.14,214a21.9,21.9,0,0,0,7.58,8.27,46.12,46.12,0,0,0,11.71,5.17c4.48,1.38,9.65,2.76,15.16,4.13a106.35,106.35,0,0,1,14.81,4.82,63.22,63.22,0,0,1,12.75,6.55,31.21,31.21,0,0,1,9,10A32.46,32.46,0,0,1,673.21,267.7Z" />
    <path
        android:fillColor="#282828"
        android:pathData="M768.65,267.7a34.5,34.5,0,0,1-3.45,15.85,38.88,38.88,0,0,1-9.3,11.71,41.9,41.9,0,0,1-13.44,7.24,51.93,51.93,0,0,1-16.54,2.41,59.46,59.46,0,0,1-26.18-5.51,49.22,49.22,0,0,1-19.29-16.19l5.17-3.45c9.3,13.09,23.08,20,41,20a42.79,42.79,0,0,0,12.75-2.07,46.61,46.61,0,0,0,11.71-5.86,34.77,34.77,0,0,0,8.61-10,30,30,0,0,0,3.1-13.78c0-6.2-1.38-11-4.13-14.81a28.7,28.7,0,0,0-10.34-9,54.87,54.87,0,0,0-13.78-5.51c-5.17-1.38-9.65-2.76-14.13-3.79A122.75,122.75,0,0,1,707,230.49a48.32,48.32,0,0,1-11-6.2,25.48,25.48,0,0,1-7.24-9.65A34.38,34.38,0,0,1,686,200.52c0-5.51,1-10.68,3.45-14.81a32.44,32.44,0,0,1,9-10.34,38.41,38.41,0,0,1,13.09-6.2,52.45,52.45,0,0,1,14.47-2.07c17.92,0,31,6.2,40,18.95l-5.51,3.1c-4.48-5.51-9.3-10-14.81-12.75s-12.06-4.13-20-4.13a46.4,46.4,0,0,0-11.37,1.38,31.66,31.66,0,0,0-11,4.82,24.75,24.75,0,0,0-8.27,8.61c-2.07,3.45-3.1,7.92-3.1,13.09A31.58,31.58,0,0,0,694.57,214a19.47,19.47,0,0,0,7.58,8.27,46.12,46.12,0,0,0,11.71,5.17c4.48,1.38,9.65,2.76,15.16,4.13a106.35,106.35,0,0,1,14.81,4.82,63.22,63.22,0,0,1,12.75,6.55,31.21,31.21,0,0,1,9,10A32.46,32.46,0,0,1,768.65,267.7Z" />
    <path
        android:fillColor="#56c0bd"
        android:pathData="M0.69,119.55V92.33C0.69,39.28,43.07,0,95.43,0h10.34C133,1,202.93,12.4,202.93,105.43V226H161.58V117.83c0-84.41-66.49-75.8-66.49-75.8C65.46,42,41.34,62.36,41.34,92.68V119.9H0Z" />
    <path
        android:fillColor="#56c0bd"
        android:pathData="M203.27,218.43A99.22,99.22,0,1,1,104,119.21,99.25,99.25,0,0,1,203.27,218.43Z" />
    <path
        android:fillColor="#fefefe"
        android:pathData="M83,198.79h38.24v86.82H83V198.79Zm-0.69-25.15a18.78,18.78,0,0,1,1.72-7.58A19,19,0,0,1,94.4,155.73a20.44,20.44,0,0,1,7.92-1.72,18.78,18.78,0,0,1,7.58,1.72,19,19,0,0,1,10.34,10.34,17.54,17.54,0,0,1,0,15.16,19,19,0,0,1-10.34,10.34,18.54,18.54,0,0,1-7.58,1.38,20.21,20.21,0,0,1-7.92-1.38,19,19,0,0,1-10.34-10.34A18.78,18.78,0,0,1,82.34,173.64Z" />
</vector>

请告诉我哪个错了以及如何解决这个问题,谢谢。

0 个答案:

没有答案