Answers for "Change Text View to A link"

0

Change Text View to A link

TextView t3 = (TextView) findViewById(R.id.text3);
t3.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."));
t3.setMovementMethod(LinkMovementMethod.getInstance());
Posted by: Guest on June-03-2021

Browse Popular Code Answers by Language