Vector Drawable assets becomes pixelated on the Android 7.0

Viewed 490

Here we are again with the Android's Vector Drawables issues... So, what do I have:

defaultConfig {
    minSdkVersion 18
    targetSdkVersion 25

    vectorDrawables.useSupportLibrary = true
}

"com.android.tools.build:gradle:25.4.0"
"com.android.support:appcompat-v7:25.4.0"

Then, I have simple android.widget.ImageView and applying vector drawables to it in the adapter using the next code:

TypedArray images = getResources().obtainTypedArray(R.array.menu_item_icon_images); menuImage.setImageResource(images.getResourceId(position, -1));

On the devices with Android 6.0 or 8.0 all icons look perfectly, when on the 7.0 they are totally pixelated. Also, the same situation when simply setting the image in the layout with app:srcCompat="@drawable/icon".

What I've tried:

And, yes, nothing gave me expected result. Any thoughts on this?

0 Answers
Related