I am trying to do a search such that all the \"visible\" search letters should be highlighted. I tried using spannable but that didn\'t do the trick, maybe I wasnt doing it
Put this code before setting text in getview
Spannable wordtoSpan = new SpannableString("Your_text_in_getviews"); wordtoSpan.setSpan(new ForegroundColorSpan(Color.RED), 0, edtFilter .getText().toString().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); txt_contact.setText(wordtoSpan);