title: Trouble making menuitem visible after asynctask
body: <p>I have a <strong>Refresh</strong> button that I would like to make visible depending on the situation.</p>
  
  <p>When the <strong>Refresh</strong> button is clicked I can make it invisible without a problem, however, I cannot make it visible again once the <code>AsyncTask</code> process finishes. I have trouble passing the <code>MenuItem</code> value back to the <code>AsyncTask</code>.</p>
  
  <pre><code>public boolean onCreateOptionsMenu(Menu menu) {
      super.onCreateOptionsMenu(menu);
      getSupportMenuInflater().inflate(R.menu.refresh_action_provider, menu);        
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    switch(item.getItemId()) {
    case R.id.menu_refresh:
        item.setVisible(false); //hide refresh button
        setSupportProgressBarIndeterminateVisibility(true);
      Toast.makeText(getApplicationContext(), "REFRESH CLiCKED", Toast.LENGTH_SHORT).show();
      new DownloadNewsTask().execute(); 
      return true;
    }
    return false;
  }
  </code></pre>