After searching for an hour there doesn't seem to be a simple (without adding classes and many functions) of removing the underline of a link.
I have this code:
newsTitle.setText(Html.fromHtml("<a href=\""+ currentNewsItem.getOriginUrl() + "\">" + currentNewsItem.getTitle() + "</a>"));
newsTitle.setMovementMethod(LinkMovementMethod.getInstance());
It comes out like this:
Is there a simple XML tag or a line of code which will remove the underline from the text?
Try this solution. It should work for textview and editext
android:background="@null"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.