[android-developers] Re: How to listen to Back key

2009-08-28 Thread Julian Peña
Hi, Just add this method to your activity. Best Regards. @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { your code here } return .; } 2009/8/27 cindy ypu01...@yahoo.com In current activity,

[android-developers] Re: How to listen to Back key

2009-08-27 Thread wangxueming
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { //do what you want return true; } return super.onKeyDown(keyCode, event); } On Aug 28, 12:24 am, cindy ypu01...@yahoo.com wrote:

[android-developers] Re: How to listen to Back key

2009-08-27 Thread Yusuf Saib (T-Mobile USA)
From http://android-developers.blogspot.com/search/label/Input%20methods: Even though the input method window doesn't have explicit focus, it receives hard key events first and can choose to consume them or forward them along to the application. For instance, you may want to consume the