tausif tausif - 6 months ago 60
Android Question

Horizontal checked line android textview

This might be a simple question but I am not able to find a solution after hours of search.
How to achieve Strikethrough effect on the

given in the image below. The line length should be same as the text length.

enter image description here

TextView textview = (TextView) findViewById(R.id.textview);
textview.setPaintFlags(textview.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);

Make sure your textview width is WRAP_CONTENT.