I want to set some vectorDrawables to a ImageView in Android Studio.
I can set png and jpg drawable easily but when i want to set V
if you are concerned with the backward compatibility then you should use AppCompatImageView
instead of image view. go through the code below.
java
AppCompatImageView image = (AppCompatImageView) findViewById(R.id.iv_about);
image.setImageResource(R.drawable.ic_vector_image);
below code need to add in build.gradle
android { defaultConfig{ vectorDrawables.useSupportLibrary = true } }
And it will serve the perspective of app:srcCompat.