I've the following html text (Exemple) :
<p><span style="color: rgb(33, 150, 243);">This is a <span style="background-color: rgb(255, 235, 59);">test !!</span></span></p>
I'm trying to display this text in a TextView.
textview.setText(Html.fromHtml(string));
It works, but display no colors.
For this to work, I have to convert the text in this form (with HEX colors)
<p><span style="color: #2196f3;">This is a <span style="background-color: #ffeb3b;">test !!</span></span></p>
How can I doi it?
I can not find the solution ... Has anyone ever had this problem and can help me?
Thanks in advance !