android - Change color font only in part of textview -
i want change part of textview color.. i've tried in way nothing change
textview textview = (textview)findviewbyid(r.id.temperature); textview.settext("temperature: "+ "<small> <font color='#59c3fa'>" + temperature + "°c</font></small>");
so first part "temperature: "
has have textview color (black in case), , rest of part #59c3fa
. how wrong?
please use html
class this.
textview.settext(html.fromhtml("temperature: "+ "<small> <font color='#59c3fa'>" + temperature + "°c</font></small>"));
Comments
Post a Comment