title: Android add a menu item at runtime
body: <pre><code>@Override
  public boolean onCreateOptionsMenu(Menu menu) {
      MenuInflater inflater = getMenuInflater();
      inflater.inflate(R.menu.main_menu, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle item selection
      switch (item.getItemId()) {
              case R.id.about:
              Intent i = new Intent(this, impresszum.class);
              startActivity(i);
  
                  return true;
              case R.id.quit:
                  AppUtils.ExitTheApplication();
                  return true;
              default:
                  return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>I have this code. I want to add some menu at runtime, when i need it. And remove some menu when i need it. How can I do that?</p>