how to change option menu items dim and highlight dynamically in android
<p>I have created option menu as, some of items are display when menu button is selected and some of options are displays in action bar itself. I am displaying the image from server in my view. I need to disable all these items(both items displays on menu button and items displays in action bar ) when image is loading into view.
I tried by putting condition in method onPrepareOptionsMenu(Menu menu). In this procedure i am able to disable/enable the items by pressing menu button.But the problem is I need to disable/enable the items dynamically depends on image loading. If image is loading items should dim and if image loading is done , items should me enable dynamically (instead of calling onPrepareOptionMenu() method by selecting menu button again and again). please help me out.. 
Thanks in advance..</p>

<pre><code>     public boolean onPrepareOptionsMenu(Menu menu) {
     boolean ok = super.onPrepareOptionsMenu(menu);
       if (isImageloading) {
          item1.setEnabled(false);  
          item2.setEnabled(false);a
         actionbar_item1.setEnabled(false);
        }
      else {
           item1.setEnabled(true);  
          item2.setEnabled(true);
          actionbar_item1.setEnabled(true);
           }
    return ok;
    }
</code></pre>
