java.lang.IllegalStateException: You must specify a color to highlight the text with before using executing the highlight operation.
I am using emphasisTextView. i use your classes and methods. but i got
java.lang.IllegalStateException: You must specify a color to highlight the text with before using executing the highlight operation.
mTextEmphasis.setText(aResult); mTextEmphasis.setTextToHighlight(mSearch); mTextEmphasis.setHighlightColor(Color.GREEN); mTextEmphasis.setCaseInsensitive(true); mTextEmphasis.highlight();
Hey there. That's because the setHighlightColor takes an android color resource, not a color from the Color class. On the next version of the library I will add support for that. In the meantime you can use one of the following two:
setTextHighlightColor("#0000FF00"); or setTextHighlightColor(android.R.color.holo_green_dark);