@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 <[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
-~----------~----~----~----~------~----~------~--~---