I’m new to both Android and Java. My app needs to be able to check what the user is typing as they are typing it. If the user types in a predetermined word that has been flagged, an event needs to occur before the user presses a button. It seems like the best choice for this would be a TextWatcher and an addChangedTextListener. I haven’t been able to figure out how to get it to check a sequence of characters (a word). For instance, if the flagged word was “very”, when the user types “It is very warm.” in the edittext, the program should be able to recognize that “very” was typed and alert the user in some way.
I hope I was able to make this clear without using any code. Any help that could be given would be greatly appreciated.
This is the simplest form of doing it via TextWatcher: