Andro Selva Andro Selva - 5 months ago 24
Android Question

Single TextView with two different colored text

As the title says, I want to know is it possible to achieve two different colored characters in a single textview element.

Answer

yes, if you formate the String with html

String text = "<font color=#cc0029>Erste Farbe</font> <font color=#ffcc00>zweite Farbe</font>";
yourtextview.setText(Html.fromHtml(text));