Set visibility in Menu programatically android
<p>So, that´s what I wanna know. How can i set the visibility of the menu programatically in Android?? This is how i have my menu:</p>

<pre><code>public boolean onCreateOptionsMenu(Menu menu){
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.menu, menu);
    return true;
}

public boolean onOptionsItemSelected (MenuItem item){
    switch (item.getItemId()){
        case R.id.menuregistrar:
            break;
        case R.id.menusalir:
            break;
    }
    return true;
}
</code></pre>

<p>But this code is not on the onCreate, so i don´t know how to set one item visible or invisible programatically(in my case, i want the "menuregistrar" to be invisible once i have registered my application and forever.</p>

<p>Thanks.</p>
