>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 directional keys to navigate within your UI for candidate
selection during composition. Or you may want to trap the back key to
dismiss any popups originating from the input method window. To
intercept hard keys, override InputMethodService.onKeyDown() and
InputMethodService.onKeyUp(). Remember to call super.onKey* if you
don't want to consume a certain key yourself."

The key you're looking for is 
http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK


Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Aug 27, 9:24 am, cindy <[email protected]> wrote:
> In current activity, when user click the back key, I don't what it
> back to the last activity.
> Can I add a listener to listen to back key in current activity? When
> user click "back" key, it actually back to the activity I want it to
> go.
>
> Thanks!
>
> Cindy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to