i used the code below for my listview and textview .
Code:
textcontent.setText(Html.fromHtml(item.get_text()));
textcontent.setAutoLinkMask(Linkify.WEB_URLS);
XML:
<TextView
android:id="@+id/txtview"
android:autoLink="web"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="put your link here"/>
the link looks like url and i can click it but it generate this exception
android.util.AndroidRuntimeException:
Calling startActivity() from outside
of an Activity context requires the
FLAG_ACTIVITY_NEW_TASK flag.
any idea how to solve this problem ?
Don’t pass application context to ListAdapter constructor. Pass your main activity instead.
Even if you create adapter in some other class you should pass main activity reference anyway.