如何添加一个"&的EditText QUOT;当你在一个特定的单词键入一个动作发生 [英] How do I add an "edittext" that when you type in a specific word an action happens
问题描述
我如何添加一个的EditText,当你在一个特定的词,如苹果键入它将使一个新的XML页面弹出。但是,如果在一个不同的单词,用户类型,除了苹果会做出不同的XML页面弹出。
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.
我完全不知道该怎么做。如果u能告诉我如何做一个视频,那将是非常有帮助的感谢! :)
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! :)
推荐答案
您应该使用的 TextWatcher 观看更改和做任何你想做的 afterTextChanged()
。
You should use a TextWatcher to watch for changes and do whatever you want on afterTextChanged()
.
这篇关于如何添加一个"&的EditText QUOT;当你在一个特定的单词键入一个动作发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!