Podążałem za oficjalnymi samouczkami Androida i jakoś mam problem z this very simple example, aby wykonać funkcję po naciśnięciu "Enter" dla EditText.Funkcja uruchamiania Androida po naciśnięciu "Enter" w EditText
rozumiem, co mam robić i wydają się mieć konfigurację wszystko prawidłowo, ale Eclipse narzeka z tej linii:
edittext.setOnKeyListener(new OnKeyListener() {
Podkreśla setOnKeyListener
z błędem:
The method setOnKeyListener(View.OnKeyListener) in the type View is not applicable for the arguments (new DialogInterface.OnKeyListener(){})
Podkreśla także: OnKeyListener
z błędem:
The type new DialogInterface.OnKeyListener(){} must implement the inherited abstract method DialogInterface.OnKeyListener.onKey(DialogInterface, int, KeyEvent)
Być może ktoś może mnie zastrzelić we właściwym kierunku? Zanim spróbuję innych rozwiązań (które już znalazłem na stackoverflow), naprawdę chciałbym to rozgryźć, ponieważ jestem podenerwowany, że coś tak prostego do naśladowania, jak oficjalny tutorial, nie wydaje się działaniem.
Z góry dziękuję.
coś takiego? http://stackoverflow.com/questions/4451374/use-enter-key-on-softkeyboard-instead-of-clicking-button/4451825#4451825 – AedonEtLIRA