If your web link is different from the text you display in the TextView:
TextView in your layout file:
<TextView android:id="@+id/textview_with_hidden_clickable_link" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/string_with_text_and_link"/>
Your line in the resource file:
<string name="string_with_text_and_link"> <a href="http://any_web_site">The text in your TextView</a> </string>
And in your Java class:
((TextView)findViewById(R.id.textview_with_hidden_clickable_link)) .setMovementMethod(LinkMovementMethod.getInstance());
NOTE: http:// in the resource string is required.
Devflanagan
source share