I have the following TextView defined:
Don't know if it's worth adding another answer, but just in case...
I had to hunt this down in a couple places but finally got this version of the code to work.
strings.xml:
<a href="http://www.google.com">link text1</a>
<a href="http://www.google.com">link text2</a>
myactivity.xml:
myactivty.java (in onCreate()):
TextView tv1 = (TextView)findViewById(R.id.textview1);
TextView tv2 = (TextView)findViewById(R.id.textview2);
tv1.setText(Html.fromHtml(getResources().getString(R.string.name1)));
tv2.setText(Html.fromHtml(getResources().getString(R.string.name2)));
tv1.setMovementMethod(LinkMovementMethod.getInstance());
tv2.setMovementMethod(LinkMovementMethod.getInstance());
This will create two clickable hyperlinks with the text link text1
and link text2
which redirect the user to google.