Created
December 22, 2016 06:46
-
-
Save dmpatel151282/3b64de9b901d34b90cbe302e57119585 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
String htmlString = | |
"<h1>HTML String Title in TextView</h1>\n" + | |
"<h3>HTML Paragraph:</h3>\n" + | |
"<p>Display html string in android TextView. How to show HTMl string in android TextView. This html paragraph</p>\n" + | |
"<h3>HTML Unordered List: </h3>\n" + | |
"<ol>\n" + | |
"\t<li>HTML List Item 1</li> \n" + | |
"\t<li>HTML List Item 2</li>\n" + | |
"\t<li>HTML List Item 3</li>\n" + | |
"\t<li>HTML List Item 4</li>\n" + | |
"</ol>"; | |
TextView textView = (TextView) findViewById(R.id.display_html_string); | |
textView.setText(Html.fromHtml(htmlString)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment