Thanks a lot for your answer. This works great for the Bold thing, but
background isnt changing...do you know why??
my Code:
if (index >= 0) {
Spannable str = (Spannable) chapterResult.getText();
str.setSpan(new BackgroundColorSpan(0xFF0000), index, index +
searchQuery.getAll().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
str.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), index,
index + searchQuery.getAll().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en