Here you can find the source of makeColoredString(String text, int color)
public static Spannable makeColoredString(String text, int color)
//package com.java2s; import android.text.Spannable; import android.text.SpannableString; import android.text.style.ForegroundColorSpan; public class Main { public static Spannable makeColoredString(String text, int color) { Spannable result = new SpannableString(text); result.setSpan(new ForegroundColorSpan(color), 0, text.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); return result; }/*from w w w . ja v a 2 s .c o m*/ }