Override onPrepareOptionsMenu. Use MenuItem item = menu.findItem(itemId) and then call item.setEnabled(false) to disable it based on some condition. >From the docs for onPrepareOptionsMenu:- "Prepare the Screen's standard options menu to be displayed. This is called right before the menu is shown, every time it is shown. You can use this method to efficiently enable/disable items or otherwise dynamically modify the contents."
On Mar 17, 8:03 am, David Toledo <dtole...@gmail.com> wrote: > Hi All > > How to disable the menuitem in android in execution time. > Example : Button Next and Back. When is in the last record, the Next menu is > disable > > Thanks > David -- 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