View a list of click links.
I use the following code inside getView () to create a clickable link in a list.
myTextView.setMovementMethod(LinkMovementMethod.getInstance());
String linkText = "<a href=\"http://www.google.com\">Google</a>";
myTextView.setText(Html.fromHtml(linkText));
This code works fine in text mode, which is not in the list, but when I use it for text viewing in the list view, when I click on the link, the following exception appears.
AndroidRuntimeException: Calling startActivity() from outside of an Activity
context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
source
share