Reputation: 2549
I'm using Textview to show text with URLs inside. How to linkfy part of text? This tag doesn't work:
<a href=\"http://www.mycite.com/terms/android\"><big>current terms</big></a>
Upvotes: 0
Views: 288
Reputation: 14808
TextView tv = (TextView) findViewById(R.id.text3);
tv.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."));
tv.setMovementMethod(LinkMovementMethod.getInstance());
Upvotes: 0
Reputation: 40416
tv.setMovementMethod(LinkMovementMethod.getInstance());
tv.setText(Html.fromHtml(Your string));
Upvotes: 2