Monday, 26 August 2013

Android: Is there a way to detect pre-defined keywords and color it differently in EditText?

Android: Is there a way to detect pre-defined keywords and color it
differently in EditText?

I am working on an Android project that needs to detect some pre-defined
keywords in the EditText, and then color those keywords differently from
the other non-keywords, it's like Syntax Coloring in Eclipse.
For Example: The pre-defined word is
stackoverflow!
So, when the user type in the keyword stackoverflow in the EditText, it
will color the keyword-stackoverflow and should look like:

Is there anyone know how to do it? Thanks!

No comments:

Post a Comment