Created
June 4, 2013 07:36
-
-
Save gnuton/5704247 to your computer and use it in GitHub Desktop.
Android: How to display rich text in a textView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextView tv = (TextView)findViewById(R.id.mytextview); | |
Spanned myStringSpanned = Html.fromHtml(myString, null, null); | |
tv.setText(myStringSpanned, TextView.BufferType.SPANNABLE); | |
Supporte TAGS on Android 2.1 | |
<a href="..."> | |
<b> | |
<big> | |
<blockquote> | |
<br> | |
<cite> | |
<dfn> | |
<div align="..."> | |
<em> | |
<font size="..." color="..." face="..."> | |
<h1> | |
<h2> | |
<h3> | |
<h4> | |
<h5> | |
<h6> | |
<i> | |
<img src="..."> | |
<p> | |
<small> | |
<strike> | |
<strong> | |
<sub> | |
<sup> | |
<tt> | |
<u> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment