开发者

Android Html to TextView

开发者 https://www.devze.com 2023-03-29 15:42 出处:网络
I am dealing with the following html <div style=\"font-size:14px; font-weight:bold;\"> My Text </div>

I am dealing with the following html

<div style="font-size:14px; font-weight:bold;"> My Text </div>

When using the class html.开发者_开发知识库fromHtml to display my html into a textview I lose the text properties. How can I display the html in a text view properly?


You should check this,
http://commonsware.com/blog/Android/2010/05/26/html-tags-supported-by-textview.html,
only few tags are supported.

You might have to use some parsers to get the values you want and set them dynamically through the code.

0

精彩评论

暂无评论...
验证码 换一张
取 消