Dinario Asked:2020-05-23 05:12:03 +0000 UTC2020-05-23 05:12:03 +0000 UTC 2020-05-23 05:12:03 +0000 UTC 安卓。矢量绘图 772 我使用 VectorDrawable 将背景图像加载到项目中。android 5.0以上一切正常,5.0以下背景模糊。为什么会出现这个问题?它可以被删除吗? android 2 个回答 Voted Best Answer TimurVI 2020-05-23T12:13:52Z2020-05-23T12:13:52Z 为了支持5.0 版(API 级别 21)之前的设备,两个新的支持库 Vector DrawableVectorDrawableCompatAnimated Vector Drawable和AnimatedVectorDrawableCompat可用:分别支持和。Androidvector-drawableanimated-vector-drawable 粘贴以下代码进行设置vectorDrawables //For Gradle Plugin 2.0+ android { defaultConfig { vectorDrawables.useSupportLibrary = true } } mifkamaz 2020-05-23T16:12:27Z2020-05-23T16:12:27Z 为了图片不模糊,在xml中加大尺寸 <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="150dp" <- увеличьте эти значения android:height="50dp" <- увеличьте эти значения android:viewportWidth="41" android:viewportHeight="14">
为了支持5.0 版(API 级别 21)之前的设备,两个新的支持库
Vector DrawableVectorDrawableCompatAnimated Vector Drawable和AnimatedVectorDrawableCompat可用:分别支持和。Androidvector-drawableanimated-vector-drawable粘贴以下代码进行设置
vectorDrawables为了图片不模糊,在xml中加大尺寸