Hi, there are multiple methods to get drawable from resId:
resources.getDrawable
ContextCompat.getDrawable
AppCompatResources.getDrawable
Is there any reason why u are using ContextCompat.getDrawable in your library instead of AppCompatResources.getDrawable?
If you not enable vectorDrawables.useSupportLibrary in build.gradle, those two methods return BitmapDrawable, after enabling first return VectorDrawable, and second return VectorDrawableCompat.
Some of vectors in my project contain fillType=evenOdd attribute(which is working on api 24 on vector drawable), after upgrading to vector drawable compat app looks the same, but tests that check drawables broke on api 23 (because library use ContextCompat.getDrawable)
Instead of passing resId, i can pass drawable in all tests that use hasDrawable method. But maybe library should use different method for getting drawables by default, what you think?
Hi, there are multiple methods to get drawable from resId:
resources.getDrawable
ContextCompat.getDrawable
AppCompatResources.getDrawable
Is there any reason why u are using
ContextCompat.getDrawable
in your library instead ofAppCompatResources.getDrawable
?If you not enable
vectorDrawables.useSupportLibrary
in build.gradle, those two methods return BitmapDrawable, after enabling first return VectorDrawable, and second return VectorDrawableCompat. Some of vectors in my project containfillType=evenOdd
attribute(which is working on api 24 on vector drawable), after upgrading to vector drawable compat app looks the same, but tests that check drawables broke on api 23 (because library useContextCompat.getDrawable
)Instead of passing resId, i can pass drawable in all tests that use
hasDrawable
method. But maybe library should use different method for getting drawables by default, what you think?