Links in TextView

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…

Leave a Comment