"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
it.

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

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
The Busy Coder's Guide to Android Development -- coming in June 2008!


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Pass SmsMessage from broadcastreceiver to activity

Hello,
like in subject, in my BroadcastReceiver class, i've some data (sms
list received), and i want to show it in a new activity.
How i have to pass data to activity?

Regards.

--~--~---------~--~----~------------~-------~--~----~

2. Using Street View within my app

Hey,

Is there a simple way to get a Street View of a given set of
coordinates (plus heading i.e. direction camera is pointng) and
display it as an image within my application?

Thanks

--~--~---------~--~----~------------~-------~--~----~

3. How can I launch the default Contact Application provided in SDK with my app

4. httpclient connection problem ?

5. Getting GPS Strength ?

6. HttpClient, URLConnection, settings, etc...

7. getLatitudeSpan, getLongitudeSpan, getHeight, getWidth errors