Android Utililty Methods SpannableString Create

List of utility methods to do SpannableString Create

Description

The list of methods to do SpannableString Create are organized into topic(s).

Method

SpannableStringgetSpanableText(String wholeText, String spanableText)
get Spanable Text
if (TextUtils.isEmpty(wholeText))
    wholeText = "";
SpannableString spannableString = new SpannableString(wholeText);
if (spanableText.equals(""))
    return spannableString;
wholeText = wholeText.toLowerCase();
spanableText = spanableText.toLowerCase();
int startPos = wholeText.indexOf(spanableText);
...
SpannablemakeColoredString(String text, int color)
make Colored String
Spannable result = new SpannableString(text);
result.setSpan(new ForegroundColorSpan(color), 0, text.length(),
        Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
return result;