Open ishaansrm opened 7 years ago
Since internally the lib is using .setImageResource() vector drawable should work, but it isn't on Kitkat and below.
Enabling the flag via AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); makes the vectors work on <=4.4 but this opt-in feature causes memory issues
UPDATE: So this is what I think is happening. setImageResource() works on pre-lollipop because Studio generates PNGs for you. Since these resources are used at runtime, Studio maybe doesnt generate PNGs for them.
I got vectors to work by referencing the ImageView the same way you do for clickable views and then setting the imageView src programatically.
in ImageView we can normally set app:srcCompat="@drawable/ic_whatever" to set a vectorDrawable, instead of PNGs.
Can we have this support in the lib?