how to change text color in the middle of the sentence in android

Viewed 3086

I need to change the color of the String which appears randomly in a sentence.

Ex: These following sentences are what I need to display.

  1. hai #xyz how are you.

  2. i am learning #abc android.

    In this I have to change the color of the words "#xyz", "#abc" i.e, which starts with the character "#".

    I used some string functions split(), subString(). but I am not getting what i need.

so, please guide me how to solve this.

3 Answers
Related