Closed benson82 closed 7 years ago
Hi, that feature was added in version 4.3, if you have that version then you can bind it using "ResourceName", if not you have to create a custom target binding to do that, you can see the current implementation to do that:
And of course don't forget AppCompatDelegate.CompatVectorFromResourcesEnabled = true;
@benson82 does this work? can we close this?
Yes I prefer to bind to ResourceId, instead of ResourceName, because of compile time resource checking. With a custom target binding it worked fine. Thanks a lot.
It worked without setting the CompatVectorFromResourcesEnabled
prop. Where do you usually set this?
To help us fix your issue, please provide the information in the below template.
The drawable should show
Actual behavior
Nothing shows. How do i bind to vector drawables (app:srcCompat) instead of "normal" .png (android:src)
Configuration
Version: 4.x