I don't think this is the right thing to do.
A good UI should not pop the panel menu programmatically, meaning by
that the user didn't press the menu button and does not expect the
panel to pop (and probably doesn't want to).
You may consider using context menus instead.
For example if you want a context menu to be popped when the user
performs a long click on an entry, just call in onCreate:
registerForContextMenu(someView);
(If you implemented an OnLongClickListener on this view, be sure to
return false not to interfere with the menu, by returning true, the
menu won't pop but you can manually pop it by calling
openContextMenu).

Then override Activity.onCreateContextMenu(ContextMenu, View,
ContextMenuInfo)
and Activity.onContextItemSelected(MenuItem)

On Nov 24, 6:24 am, plusminus <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> anyone knows how to open a submenu using code?
>
> I only know how to open the menu itself using this snippet:
> this.getWindow().openPanel(Window.FEATURE_OPTIONS_PANEL, new KeyEvent
> (KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MENU));
>
> Regards, plusminushttp://anddev.org
> #  Worlds largest Android Development Community / Tutorials
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to