I have read from various blogs that div tag is supported by Html.fromHtml but it doesn't support attribute. 属性。
What i want to do is to assign a background color as specified by the string which contains the html tags. Something like
<p style="background-color:green;">This is a paragraph.</p>
If style attribute is not supported by Html.fromHtml(), is there any other way such that I can change the bgcolor using html tags.
Thanks.
使用代码:
yourfield.setBackgroundColor(Color.parseColor("#ca1216"));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.