1

My "stress" is place a hyperlink on a item of ArrayList. Dont have any TextView on XML, only a simple ListView.

private void prepareListData() { listDataHeader = new ArrayList<String>(); listDataChild = new HashMap<String, List<String>>(); //header listDataHeader.add("Text Example"); //itens List<String> ItemAL = new ArrayList<String>(); ItemAL .add("Text Example"); ItemAL .add(**"Watch Clip - http://videos.sapo.pt/testtesttest**"); listDataChild.put(listDataHeader.get(0), ItemAL ); } 

And my XML FILE:

<RelativeLayout... <ListView android:layout_marginTop="100dp" android:id="@+id/lvExp4" android:layout_height="match_parent" android:layout_width="match_parent" tools:listitem="@android:layout/simple_list_item_checked" /> </RelativeLayout> 
1
  • What adapter are you using? Commented Oct 3, 2015 at 0:57

2 Answers 2

1

Use a custom base adapter with a layout file for a particular list item. The text view which you need hyperlink can be made by using either spannable using underline span or painting the textview.

Sign up to request clarification or add additional context in comments.

Comments

0

First of all create adapter for your listview,and set textview as per your requirements and then

use this property in your textview attribute :-

android:autoLink="web" 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.