Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
As we know this is the age of vector for android. But there is some constraints even in the latest support libraries. One such is setting vector image for the drawable associated with the text view.
In order to add vector drawable images/icons in the drawable of a text view. We can use the following workaround. Until Android guys don’t come up with the updated libraries.
android:drawableTop="@drawable/ic_wishlist_wrapper" 1 android:drawableTop="@drawable/ic_wishlist_wrapper"
The idea is of adding vector image inside a layer-list or selector drawable and then setting it directly.
Here is the example:
/* ic_wishlist_wrapper.xml */
/* ic_wishlist.xml */
and now setting ic_wishlist_wrapper instead of ic_wishlist will do the trick.
Hope this trick works for you and you continue to support more and more VectorDrawables.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.