Zelig
Zelig

Reputation: 1808

Crossing out a text

I would like to cross out a text in a TextView. So far, I have created a Style but I haven't seen anything about crossing the text out. With android:TextStyle, it is possible to have the text in bold, italic and bold italic but, apparently, nothing else.

Is there a way to define a Style which would cross the text out? Or is there another solution to my problem?

Upvotes: 0

Views: 126

Answers (1)

Chintan Soni
Chintan Soni

Reputation: 25267

If you mean strikethrough then, just write:

textview.setPaintFlags(textview.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);

Upvotes: 1

Related Questions