问题描述:

I am creating a news app.I have succesfully parsed (using sax) the file and added the title in the list view. I want to add link to the title respectively. So once the title is clicked it opens the detailed news of the respective title

How do i add the link to the title.?

this is the xml file i use..

网友答案:

Simply you have create custom Adapter.

Refer this link,

How to change color and font on ListView

textview set as link use below code,

textView.setText(Html.fromHtml(
        "<b>text3:</b>  Text with a " +
        "<a href=\"http://www.google.com\">link</a> " +
        "created in the Java source code using HTML."));

textView.setMovementMethod(LinkMovementMethod.getInstance());

相关阅读:
Top