HTML to TextView
HTML to TextView
You can convert an HTML code (only with text) to TextView by following the steps.
Step 1:
Create a string variable, I'll name it html_string
Step 2:
Set your string value (html_string) to the HTML codes you want to use, e.g.:
<span style="color: #F44336"><b>URL</b></span>: skeshwarecodes.blogspot.com
Step 3:
Add this code after:
textview1.setText(Html.fromHtml(html_string));
textview1.setMovementMethod(android.text.method.LinkMovementMethod.getInstance());
Where i put html codes? In activity above the second code?
ReplyDelete