I'm trying to display JSON results in a textview (that resides within a listview). One of the Results is a URL which has to be displayed as "View results". I'm using the following code to display the URL as "View Results":
String result = "<a href=\"" + jsonObject.get("url") + "\">" + getString(R.string.hyperlink_text) + "</a>" + "\n";
bbieResults.put("Result", Html.fromHtml(result));
The related xml layout:
<TextView
android:id="@+id/list_result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/list_label"
android:layout_marginLeft="10dp"
android:autoLink="web"
android:linksClickable="true"
android:textSize="25dp" />
This textview does display "View results" as a label for the URL but I can't actually click it. So how can I make this a clickable hyperlink?
Thanks in advance :)