title: How to get menu item id on action bar when other menu item clicked
body: <p>So I have menu items on action bar. on onOptionsItemSelected, I want to change the menu items images. </p>
  
  <p>Here's my code</p>
  
  <pre><code>    @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle presses on the action bar items
      switch (item.getItemId()) {
      case R.id.todaySched:{
          viewTodaySched();
          item.setIcon(R.drawable.calendarselected);
          infoLog=(MenuItem)findViewById(R.id.infoLog);
          infoLog.setIcon(R.drawable.book);
  
          return true;}
      case R.id.infoLog:{
          viewInfoLog();
          item.setIcon(R.drawable.bookselected);
                      todaySched=(MenuItem)findViewById(R.id.todaySched);
          todaySched.setIcon(R.drawable.calenderselected);
          return true;}
      default:
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>But the icon won't change when I clicked it, and I got run time error.
  e.g: When I click todaySched icon, It seems like I can't get the infoLog item id. </p>
  
  <p>My LogCat: <a href="https://www.dropbox.com/s/0wfz0ogkh57vbtz/log.txt" rel="nofollow">LogCat</a></p>