0
例如下面的代碼作品的權利TextUtil.concat不保留超鏈接
CharSequence text = TextUtils.concat("before ", Html.fromHtml("<b>This works</b>"), " after ");
myTextView.setText(text, TextView.BufferType.SPANNABLE);
如果我在HTML代碼放在一個超鏈接,即
CharSequence text = TextUtils.concat("before ", Html.fromHtml("<a href=\"www.google.it\">Google</a>"), " after ");
myTextView.setText(text, TextView.BufferType.SPANNABLE);
Linkify.addLinks(myTextView, Linkify.ALL);
「谷歌」被顯示,但超鏈接不undelined正確並且不可點擊。有什麼建議?
曾爲把classNameTextView.setMovementMethod(LinkMovementMethod.getInstance());之後的setText :)謝謝:) – rciovati 2010-09-22 18:43:14