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:
- All suggestions mentioned there https://code.google.com/p/android/issues/detail?id=202019
- Standard material Vector Drawable icons
- Both `wrap_content~ and fixed size
- To mix the options above
And, yes, nothing gave me expected result. Any thoughts on this?