Fustigador
Fustigador

Reputation: 6469

Linkify without showing the full url

I have used

Linkify.addLinks(textview, Linkify.ALL);

To make a TextView clickable, and to act like, well, a link. The problem is, if the link is too large, it looks very ugly. Is there any way to make it shorter, or substitute the url for a text? Anybody knows of a library that can suit me?

Thank you.

Upvotes: 0

Views: 395

Answers (1)

Gabor Novak
Gabor Novak

Reputation: 286

Try to use the following in the textView.setText() method:

Html.fromHtml("A text with a <a href=\"http://somelonglink\">link</a>")

Upvotes: 1

Related Questions