title: Why onMenuItemSelected didnt respond ??? with ActionBar
body: <p>Hy im trying to make a Intent / Toast by onMenuItemSelected with ActionBarSherlock in my Activity. But i already insert the code like example in web but it didnt respond. please tell me where the wrong code ???</p>
  
  <p>This is my Code</p>
  
  <pre><code>public boolean onCreateOptionsMenu(Menu menu) { 
      SubMenu sub = menu.addSubMenu("more");
      MenuItem ShareButton = sub.getItem();
      ShareButton.setIcon(R.drawable.more);
      ShareButton.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS| MenuItem.SHOW_AS_ACTION_WITH_TEXT);
      MenuInflater inflater = getSupportMenuInflater();
      inflater.inflate(R.menu.activity_home, sub);
  
      return true;
  
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle item selection
      switch (item.getItemId()) {
  
      case R.id.menu_item_account:
              Toast.makeText(myContext, "You Choosed Account",Toast.LENGTH_SHORT).show();
  
              return true;
          case R.id.menu_item_setting:
              Toast.makeText(myContext, "You Choosed Setting", Toast.LENGTH_SHORT).show();
  
              return true;
          case R.id.menu_item_exit:
              Toast.makeText(myContext, "You Choosed Exit", Toast.LENGTH_SHORT).show();
              finish();
              return true;
          default:
              return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p><strong>THE SOLUTION</strong></p>
  
  <p>This is my new Code. Just Remove the OnOptionMenuSelected method, and just Use onMenuItemSelected :</p>
  
  <p>@Override
      public boolean onMenuItemSelected(int featureId, MenuItem item) {</p>
  
  <pre><code>    int itemId = item.getItemId();
      switch (itemId) {
      case android.R.id.home:
          finish();
          break;
      case R.id.menu_item_account:
          Toast.makeText(myContext, "Anda memilih Account",
                  Toast.LENGTH_SHORT).show();
          setContentView(R.layout.account_contoh_layout);
          return true;
      case R.id.menu_item_setting:
          Toast.makeText(myContext, "Anda memilih Setting",
                  Toast.LENGTH_SHORT).show();
          setContentView(R.layout.settings_contoh_layout);
          return true;
  
      }
  
      return true;
  }
  </code></pre>
  
  <p>@Override
      public boolean onCreateOptionsMenu(Menu menu) {</p>
  
  <pre><code>    // Used to put dark icons on light action bar
      SubMenu sub = menu.addSubMenu("");
  
      MenuItem ShareButton = sub.getItem();
      ShareButton.setIcon(R.drawable.ic_more);
      ShareButton.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS
              | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
      MenuInflater inflater = getSupportMenuInflater();
      inflater.inflate(R.menu.activity_home, sub);
  
      return true;
  
  }
  </code></pre>