android 6 中的 VectorDrawable 渲染不佳
VectorDrawable bad rendering in android 6
我有很多矢量图标,我在不同的 android 版本上测试了它们,但是其中一些矢量在 android marshmallow 上的渲染不正确,而在其他 android 版本上不正确问题和渲染都很好。
gradle:
defaultConfig {
minSdkVersion 15
targetSdkVersion 24
vectorDrawables.useSupportLibrary = true
}
在我的 activity
之上
static {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
我使用的是最新的 appcompat 版本
compile 'com.android.support:support-v4:24.2.1'
compile 'com.android.support:appcompat-v7:24.2.1'
支持库更新至 25.0.0 版
我有很多矢量图标,我在不同的 android 版本上测试了它们,但是其中一些矢量在 android marshmallow 上的渲染不正确,而在其他 android 版本上不正确问题和渲染都很好。
gradle:
defaultConfig {
minSdkVersion 15
targetSdkVersion 24
vectorDrawables.useSupportLibrary = true
}
在我的 activity
之上static {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
我使用的是最新的 appcompat 版本
compile 'com.android.support:support-v4:24.2.1'
compile 'com.android.support:appcompat-v7:24.2.1'
支持库更新至 25.0.0 版