Saturday, July 2, 2011

[android-developers] Html-style links inside ListView items

I've read many posts about the problem with having links inside
ListView items. The suggestions include:

- setText(Html.fromHtml(textWithHtmlLinks))
- setAutoLinkMask(Linkify.WEB_URLS)
- setMovementMethod(LinkMovementMethod.getInstance())

However, I can't get any combination of the above to work.

Seems like most (all?) Twitter client developers have the same
problem, since they all lack the obvious feature to be able to tap on
a link. Instead, they start a new activity or dialog where you can tap
the links.

Has anyone found a good solution to this problem?

Extra bonus points if it can be solved while still having the
possibility to have click events on the rest of the list item area.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment