how to get menu handler

by sjia » Tue, 16 Dec 2008 06:28:18 GMT


Sponsored Links
 I'd like to disable a menu item in void onCreate(Bundle
savedInstanceState).  Is there a system call to get the menu handler?
Thanks

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



how to get menu handler

by Dmaxi » Wed, 17 Dec 2008 07:19:48 GMT


 You can get the Options Menu instance for your activity from
onCreateOptionsMenu(Menu) method which is called only once when it is
initialized or from onPrepareOptionsMenu(Menu) method which is called
every time the menu button pressed.
See 
 http://code.google.com/intl/en-EN/android/reference/android/app/Activity.html #onCreateOptionsMenu(android.view.Menu)
and 
 http://code.google.com/intl/en-EN/android/reference/android/app/Activity.html #onPrepareOptionsMenu(android.view.Menu)

Robert
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. About porting dalvik to Symbian

Does porting dalvik runtime to Symbian be feasible? Can anybody give
some suggestion? S60 has a P.I.P.S library which supports POSIX APIs.
I don't how hard it will be to port dalvik to symbian.
I post this message to android-platform. They suggest me to post it
here.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Color.colorToHSV bug

I believe there is a bug in Android's implementation of
Color.colorToHSV().  If you pass it fully desaturated color, it
assigns all three HSV components to the same value, that value being
the "value" component of the color.  While hue is arguably arbitrary
in such an instance could be assigned any value at random, saturation
should unambiguously be assigned zero in such a case...at least,
that's how I see it.  I have circumvented this bug in my code by
testing the individual bytes of the input color against each other to
detect desaturation, and when it occurs, explicitly overwriting the
resulting HSV color's saturation component with zero, but this bug,
assuming I'm interpreting it correctly as a bug, should be fixed.

BTW, is there an official channel to file such a bug report?  I don't
see anything jumping out at me when I explore developer.android.com,
but maybe I missed it.

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

3. how to test bluetooth handset/handsfree without phone module

4. Strange GestureDetector side effect when used in a subclass of FrameLayout?

5. Unused java hardware acceleration on the G1 (was Android game developers desperately need optimised game engine example code ...)

6. Test FrameWork

7. Unused java hardware acceleration on the G1 (was Android game developers desperately need optimised game engine example code ...)