[android-developers] Re: How to implement a link view

2009-05-11 Thread Peter
I think you might need this code: private static final void addLinkMovementMethod(TextView t) { MovementMethod m = t.getMovementMethod(); if ((m == null) || !(m instanceof LinkMovementMethod)) { if (t.getLinksClickable()) {

[android-developers] Re: How to implement a link view

2009-05-07 Thread rain
I find a way to display the link text: TextView tv = new TextView(this); SpannableString str = SpannableString.valueOf(google); str.setSpan(new URLSpan(http://www.google.com;), 0, 6, Spannable.SPAN_INCLUSIVE_EXCLUSIVE); tv.append(str); but when i click the text, there will not trigger the open