> I have a proble with onKeyDown: > my activity consists in a simple textView (as header) and a ListView > below it, I need to go back to the previous screen when the user > presses the back button.
That should happen automatically, without implementing onKeyDown(). > Thus, I implemented the onKeyDown method. Where? On the activity? On a subclass of one of the widgets? > Everything works fine if the > list contains some elements, but when the list is empty the onKeyDown > method is never called... I would just get rid of it and allow Android to handle the back button, since Android's default behavior seems to be what you want. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

