"Menu" button disabled when I override onKeyDown

by Mark Murphy » Mon, 19 May 2008 16:32:23 GMT

Sponsored Links
 > I am overriding onKeyDown in my activity, and calling

I'm not sure this is the problem, but you probably should return the value
of super.onKeyDown(keyCode,event); for the cases where you're not handling
the key.

Basically, if you're not handling the key, you want Android to use the
exact same behavior as if you didn't have an onKeyDown() method in the
first place. Right now, though, you're always returning true, which may or
may not be what super.onKeyDown() would return if you weren't overriding

If that doesn't clear up the problem, write back!

Mark Murphy (a Commons Guy)
The Busy Coder's Guide to Android Development -- coming in June 2008!


Other Threads

1. MapView draw Overlays


i have a problem with my mapView. my app reads "some" gps points out
of a file and i want to draw a route (drawing lines between the gps
point). If my file contains many gps points, my app works really slow.
i think its working slow, because i draw all overlays.
now i want to check, whether a point is visible in my mapView or not.
so i have to get the mapCenter and Lat/lon span
(getLatitudeSpan,..) !?
how and where must i save my points and how can i check all my points
(after my mapCenter has changed for example).
Shall I save my points in a list (in my Overlay class??) and iterate
through every list item and check, wheter its visible or not??



2. add an aidl file in android framework

hallo , i want to add an aidl file in android framework so i can
import it in two applications(one binds remotely to the other).How can
i do that?


3. Font resizing

4. Webview segfault causes process to restart and in rare cases take the Android platform down and turn the phone off

5. Tanya daftar gadget yang ber-Androi

6. (Closed) Valentine day

7. Media Player not working on HTTPS as Data source