title: Android adding a submenu to a menuItem, where is addSubMenu()?
body: <p>I want to add a submenu inside my OptionsMenu to a menuItem, programatically according to my parameters. I've checked "MenuItem" in android sdk and there is no addSubMenu() method!, although you can find "hasSubMenu()" and "getSubMenu". <p> </p>
  
  <p>Was thinking on doing this in onCreateOptionsMenu:</p>
  
  <pre><code>public boolean onCreateOptionsMenu(Menu menu) {
  
      MenuItem mi = menu.getItem(MYITEMID);  // &lt;&lt; this is defined in my XML optionsMenu
      SubMenu subm = mi.addSubMenu(0,1,0,"Map 1"); // no addSubMenu() method!!!???
  ....
  </code></pre>
  
  <p>How do I create a submenu inside a menuitem in code?</p>