What I mean is, is it possible to change the text “This text is blue” to the color blue in a single string? There must be a way…
<TextView
android:gravity="left"
android:padding="3dip"
android:text="This text is white. This text is blue."
android:textColor="#ffffff"
android:textSize="22dp"/>
Yes, its possible. For this you need to use
SpannableStringandForegroundColorSpan.This should look something like this: