Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS 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 18.104.22.168 release ready!
Owner and Founder. Opencart
There are many scenarios in which we need to show a Strike-through text to an android user like Old prices, old offers, etc. But android doesn’t give any such option via XML file. If you want to show a strike-through text you can do it programming using PaintFlags. You can set paint flags Paint.STRIKE_THRU_TEXT_FLAG to a TextView and it will add a strike-through to the text.
But when you need it in your XML. As I am using Data Binding so my priority is to set everything related to a view in the xml. So I found this workaround on stackoverflow for my problem.
We just have to set a background that contains a line to our TextView like I did.
and the drawable for the strike-through line
and you will get the text as you want.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.