By default I set the visibility to false by using following code.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_items, menu);
menu.findItem(R.id.action_share).setVisible(false);
return true;
}
Now how can I make it visible again when user clicks a button in my activity.