Clickable Links inside listview
android, android-activity, android-listview, textview
Solution
Got the answer here. I just had to change the constructor call from
CustomAdapter mAdapter = new CustomAdapter( mContext, itemList);
to
CustomAdapter mAdapter = new CustomAdapter( this, itemList);
Problem
List view clickable link poblem. I'm using the following code inside the getView() to generate a clickable link in a listview. ``` myTextView.setMovementMethod(LinkMovementMethod.getInstance()); String linkText = "<a href=\"http://www.google.com\">Google</a>"; myTextView.setText(Html.fromHtml(linkText)); ``` This code works fine on a textview which is not in a listview but when i use it for a textview within a list view the following exception is raised on clicking the link. ``` AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? ```