Trevor Johns | ec98514 | 2013-10-30 21:57:35 +0000 | [diff] [blame^] | 1 | page.title=Linkify Sample |
| 2 | @jd:body |
| 3 | <p>This sample demonstrates how clickable links can be added to a |
| 4 | <a href="http://developer.android.com/reference/android/widget/TextView.html">TextView</a>. |
| 5 | This can be done automatically (see |
| 6 | <a href="http://developer.android.com/reference/android/widget/TextView.html#setAutoLinkMask(int)"> |
| 7 | TextView#setAutoLinkMask(int)</a>), explicitly by parsing a String as |
| 8 | HTML (see |
| 9 | <a href="http://developer.android.com/reference/android/text/Html.html#fromHtml(java.lang.String)"> |
| 10 | Html#fromHtml(String)</a>) or using a |
| 11 | <a href="http://developer.android.com/reference/android/text/SpannableString.html">SpannableString |
| 12 | </a> consisting of |
| 13 | <a href="http://developer.android.com/reference/android/text/style/StyleSpan.html">StyleSpan</a> |
| 14 | and <a href="http://developer.android.com/reference/android/text/style/URLSpan.html">URLSpan</a> |
| 15 | objects. </p> |