I have an EditText, and the word is entered there.
If one word is entered there, one Activity will open,
if another word is entered, another Activity will open.
This will all be implemented with TextWatcher, but I do not know how to put a switch there. Help me please!

  • onTextChanged is what you need. - Yuriy SPb
  • @Yuriy SPb, how can you use the switch in the function you specified? I'm just already interested in myself, the TS asked a rather non-standard question)) so if I do an if , I can imagine how, but I can't think of a switch through the switch . I've been sitting all evening) - Andrew Goroshko
  • one
    Well ... just public void onTextChanged(s:Editable) { switch(s.toString()) {case "example" : println("example") break;} } - YuriSPb
  • Damn, I did not think)))) I will know))) I hope the vehicle will help solve his problem) - Andrew Goroshko

0