HI guys,

Thanks for your replies, i want to change the menu item status from
disable to enabled while it is displaying on the screen.
i can enable it but the menu item does not re-paint themselves when
they are on the screen.

any other comments?

Thanks

Sam

On Sep 7, 6:08 pm, Keean Schupke <[email protected]> wrote:
> Actually you can use:
>
> onPrepareOptionsMenu
>
> which is called just before the menu is displayed to add or remove
> items.
>
> Regards,
> Keean.
>
> On Sep 7, 9:50 am, Nivek <[email protected]> wrote:
>
>
>
> > As Menu Items are generated only once in the onCreateOptionsMenu(),
> > you might try to keep a reference to each item in instance variables
> > and enable/disable them in the handlers that receive task results ?
>
> > Nivek
>
> > On 7 sep, 05:24, sam <[email protected]> wrote:
>
> > > Hi guys,
>
> > > Any help on this? I believe android application like browser implement
> > > this,
> > > does the android engineer from google have any comments?
>
> > > Thanks
>
> > > On Sep 3, 9:38 am, sam <[email protected]> wrote:
>
> > > > 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" <[email protected]> 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-Hidequotedtext -
>
> > > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to