I have TextView. Using java code I want to set color for string variable that I have to append to the text. Variable is generated at run time.
I explored Spannable but you have to give start and end which is not fixed. Any other way to fix this. Please help.
Code:
String text; (Filled at runtime)
//but I want it to be different color
textview.append(text);