Hi Mark, Thank for reply. let me describe my question in more details, I do not want to press the Menu button again, when the menu items are displayed as disabled, after I finished some work , i want the menu items to be repainted automatically. Any suggestions?
thanks On Sep 2, 6:23 pm, "Mark Murphy" <mmur...@commonsware.com> wrote: > > I would like to know how to dynamically change the my option menu > > items status from disable to enabled . > > > at first all my menu items are set to disabled and when click the menu > > key , they are shown as gray and disabled. > > > when my other task finished, i want to enable all the menu items, > > change them from gray to dark color from the screen. > > > do you know how can i implement this? > > Implement onPrepareOptionMenu() instead of onCreateOptionMenu(). > onPrepareOptionMenu() is called every time the MENU button is pressed. At > that time, you know whether your menu items should be enabled/disabled, so > enable/disable them as part of loading up the menu contents. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > Android App Developer Books:http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---