how to change color of textview hyperlink?

Viewed 102370

I am using this code for hyperlink:

<TextView 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:id="@+id/hyperlink" 
    android:text="@string/hyperlink"
    android:autoLink="web"/>

By default it is showing blue color, but how do I change color of hyperlink in Android?

9 Answers

Add these Lines of code to your textview in XML file and it will work perfectly fine

android:autoLink="web"
 android:textColorLink="@android:color/holo_orange_dark"
 android:linksClickable="true"

In xml file of TextView tag :

android:autoLink="web" //link the content of web  
android:textColorLink="#FFFFFF" //change the color of the link 
Related