I have a TextView in layout
 <TextView
    android:id="@+id/homepage"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
I would like to set a string with HTML link in this TextView, and make the link clickable (open the link on browser when clicked). I tried the following:
I defined the string in resource, the string contains a HTML link to google website:
<string name="home_page">please go to <a ref="www.google.com">www.google.com!</a>.
In my Activity:
TextView homepage =  (TextView)findViewById(R.id.homepage);
String text = getString(R.string.home_page)
CharSequence styledText = Html.fromHtml(text);
homepage.setText(styledText.toString());
The result is please go to www.google.com , but the www.google.com is not a clickable link. How to make it clickable? (I mean open the link in browser when clicked)
 
     
     
     
     
    