Thanks Mark, it´s working now...
I didn´t realize that..
Ricardo
On 18 out, 11:37, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Ricardo wrote:
> > Hi all,
>
> > I created a MapActivity/MapView and I override the onKeyDown method
> > like this.
>
> > But now the "back button" doesn´t work any more.
>
> > Since I returned false in my code, this means I didn´t handle this
> > event and it should continue...
>
> > So I didn´t understand why the back button crashed..
>
> > any idea? thank you
>
> > public boolean onKeyDown(int keyCode, KeyEvent event) {
> > if (keyCode == KeyEvent.KEYCODE_Z) {
> > mapView.getController().zoomIn();
> > return true;
> > } else if (keyCode == KeyEvent.KEYCODE_X) {
> > mapView.getController().zoomOut();
> > return true;
> > }
>
> > return false;
> > }
>
> Don't return false. Return super.onKeyDown(keyCode, event). Right now,
> you're overriding all the base functionality.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---