Reputation: 984
I have managed to make underline in my textview. Here is the code :
txtOrder1.setPaintFlags(txtOrder1.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
Now i want to remove that underline. Is it possible ?
Upvotes: 0
Views: 195
Reputation: 25312
You need to try like below code:
txtOrder1.setPaintFlags(txtOrder1.getPaintFlags() & (~ Paint.UNDERLINE_TEXT_FLAG));
Upvotes: 3
Reputation: 1368
For remove the Underline use like this
txtOrder1.setPaintFlags(txtOrder1.getPaintFlags() | ~ Paint.UNDERLINE_TEXT_FLAG);
or
txtOrder1.setPaintFlags(0);
Upvotes: 1