问题
How do I add a "edittext" that when you type in a specific word such as "apple" it will make a new xml page pop up. But if the user types in a different word besides "apple" it will make a different xml page pop up.
What I'm trying to accomplish is somethings similar to a logo quiz game where when you type in the right word, a new thing pops up.
I have absolutely no idea how to do it. if u could show me a video on how to do it, that would be very helpful thanks! :)
回答1:
You should use a TextWatcher to watch for changes and do whatever you want on afterTextChanged()
.
来源:https://stackoverflow.com/questions/15604595/how-do-i-add-an-edittext-that-when-you-type-in-a-specific-word-an-action-happe