title: option item selection in Dialog menu
body: <p>I have been running into some troubles recently and I think I need your help :).
  I am currently trying to show a menu on top of a dialog, I know that it could be far easier to launch a new activity yet doing so would compell me to store/pass a lot of data.
  I managed to show an optionmenu by writing a custom dialog and rewriting the oncreateOptionMenu method. 
  My problem is I can't get any listener to these button, I tried to rewrite the onoptionitemselectedmethod but nothing happens.
  Ps: my dialog is nearly full screen so i can't see the activity dialog (i didn't find any put on top method)</p>
  
  <p>I would be glad to try any solution you could provide.</p>
  
  <p>Thanks a lot</p>
  
  <pre><code>public boolean onCreateOptionsMenu(Menu menu) {
      super.onCreateOptionsMenu(menu);
      menu.add(Menu.NONE,0,Menu.NONE,c.getString(R.string.home));
      menu.add(Menu.NONE,4,Menu.NONE,c.getString(R.string.report));
      return true;
  }
  public boolean onOptionsItemSelected(MenuItem item) {
      super.onOptionsItemSelected(item);
      if(item.getItemId()==0){
          getOwnerActivity().startActivity(new Intent(c,Home.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
      }
      else
          if(l&gt;1)
              getOwnerActivity().startActivity(new Intent(c,report.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
          else
              dismiss();
      return true;
  }
  </code></pre>