How do I inflate an Android options menu and set an item to Enabled=false?
<p>My XML menu definition sets the item R.id.menu_refresh's enabled state to false. When the app runs the menu item is greyed and disabled. Why is this code in the app not enabling the item?</p>

<pre><code>public boolean onCreateOptionsMenu(Menu menu)
{
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.main, menu);
    MenuItem refresh = menu.getItem(R.id.menu_refresh);
    refresh.setEnabled(true);
    return true;
}
</code></pre>

<p>What am I missing?</p>
