I am using using Html.fromHtml to set the corresponding text for a TextView object. Said HTML has url links that I want users to be able to click on and open the browser to that link. I am using LinkMovementMethod to accomplish that fine and dandy. The problem is the link markup is coloring it in th开发者_StackOverflow社区e traditional dark blue against a black background, this is bad. I'd like to keep the blackbackground color and change the link color to a lighter blue. How can I do this?
Here is a brief code snippet...
TextView servicesTextView = (TextView)activity.get().findViewById(R.id.ServicesText);
servicesTextView.setText(Html.fromHtml(servicesText));
servicesTextView.setMovementMethod(LinkMovementMethod.getInstance());
Boy, each time I finally write a up a question on StackOverflow, I end up finding the answer myself.
TextView
has setLinkTextColor
method.
精彩评论