title: android: remove an item from submenu
body: <p>I created list of items in a menu. All these items will be shown in the action bar. Then each item will have a submenu of items again.</p>
  
  <p>Bellow is my xml code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/sceneMenu" &gt;
  
  &lt;item
      android:id="@+id/whiteBalanceList"
      android:icon="@drawable/white_balance_list"
      android:showAsAction="always"
      android:title="@string/selWhiteBalance"&gt;
      &lt;menu&gt;
          &lt;item
              android:id="@+id/whiteBalanceAuto"
              android:title="Auto" /&gt;
          &lt;item
              android:id="@+id/whiteBalanceCloudy"
              android:title="Cloudy Daylight" /&gt;
          &lt;item
              android:id="@+id/whiteBalanceDaylight"
              android:title="Daylight" /&gt;
          &lt;item
              android:id="@+id/whiteBalanceFluorescent"
              android:title="Fluorescent" /&gt;
          &lt;item
              android:id="@+id/whiteBalanceIncandescent"
              android:title="Incandescent" /&gt;
          &lt;item
              android:id="@+id/whiteBalanceShade"
              android:title="Shade" /&gt;
          &lt;item
              android:id="@+id/whiteBalanceTwilight"
              android:title="Twilight" /&gt;
          &lt;item
              android:id="@+id/whiteBalanceWarm"
              android:title="Warm Fluorescent" /&gt;  
      &lt;/menu&gt;
  &lt;/item&gt;
  &lt;item
      android:id="@+id/flashList"
      android:icon="@drawable/flash_list"
      android:showAsAction="always"
      android:title="@string/selFlash"&gt;
      &lt;menu&gt;
          &lt;item
              android:id="@+id/flashAuto"
              android:title="Auto"/&gt;
          &lt;item
              android:id="@+id/flashOn"
              android:title="On"/&gt;
          &lt;item
              android:id="@+id/flashOff"
              android:title="Off"/&gt;
      &lt;/menu&gt;
  &lt;/item&gt;  
  &lt;/menu&gt;
  </code></pre>
  
  <p>When I try to remove the submenu item (for e.g. I want to remove the item "Auto" under 'White Balance List' submenu) with the following code:</p>
  
  <pre><code>menu.getItem(R.id.whiteBalanceList).getSubMenu().removeItem(R.id.whiteBalanceAuto);
  </code></pre>
  
  <p>I get an error of index outOfBoundException because R.id.whiteBalanceList will actually result in random unique number but menu.size() is only 2...</p>
  
  <p>BUT if I do a removeItem instead i.e.</p>
  
  <pre><code>menu.removeItem(R.id.whiteBalanceList);
  </code></pre>
  
  <p>It runs perfectly...</p>
  
  <p>any idea why?</p>