SpannableString spannableString = new SpannableString(textView.getText().toString()); spannableString.setSpan(CharacterStyle.wrap(new BackgroundColorSpan(Color.YELLOW)), i, i + searchedText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); textView.setText(spannableString);
This is the code Which i've used to highlight yellow to any textview,
But this Library doesn't support Highlighting any Color over Specific TextView.
Any Help Would be Appreciated.
SpannableString spannableString = new SpannableString(textView.getText().toString()); spannableString.setSpan(CharacterStyle.wrap(new BackgroundColorSpan(Color.YELLOW)), i, i + searchedText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); textView.setText(spannableString);
This is the code Which i've used to highlight yellow to any textview, But this Library doesn't support Highlighting any Color over Specific TextView. Any Help Would be Appreciated.