Android Utililty Methods TextView Highlight

List of utility methods to do TextView Highlight

Description

The list of methods to do TextView Highlight are organized into topic(s).

Method

voidhighlight(int start, int end, TextView text)
hightlight text
SpannableStringBuilder spannable = new SpannableStringBuilder(text
        .getText().toString());
ForegroundColorSpan span = new ForegroundColorSpan(Color.RED);
spannable.setSpan(span, start, end,
        Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
text.setText(spannable);