I need to put a link in a TextView
, I have a string that contains the tag <a href="link">Text for link</a>
and some other text. The problem is that if I run the project I can see the text but it's not clickable. I tried with the <b>
tag too to see if that works and it seems that it doesn't work too.
How can I make this to work without the Linkify
usage?
Thank you for your help all.
I have managed to make this work, after I have found some examples in the android samples.
here is the code:
textView.setText(Html.fromHtml( "<b>text3:</b> Text with a " + "<a href=\"http://www.google.com\">link</a> " + "created in the Java source code using HTML.")); textView.setMovementMethod(LinkMovementMethod.getInstance());
Hope this help others...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With