Sample code to make a textview underline -
tvPrivacy3.setPaintFlags(tvPrivacy3.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
And sample code to make textview strike line
tvPrivacy3.setPaintFlags(tvPrivacy3.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
setPaintFlag method of textview sets flags on the Paint being used to display the text and reflows the text if they are different from the old flags.
getPaintFlag method of textview represents flags on the Paint being used to display the text.
1 Comment(s)