Mark, the topic says "submenu", but if you look at the first post it
does deal with a context menu :
"When I long press a contact,
then a sub menu pops up - to let me 'edit','remove' ... " he just
called it a submenu (because it looks exactly the same).

So the standard way to do this is like I previously said:

call Activity.registerContextMenu(View)

Then override the following method to inflate your menu:
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenu.ContextMenuInfo menuInfo)

To react on an menu item click:
public boolean onContextItemSelected(MenuItem item)

And to do some stuff after the menu is closed:
public void onContextMenuClosed(Menu menu)


On Nov 29, 7:27 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> zLarry wrote:
> > Like android bundled contact applicaiton. When I long press a contact,
> > then a sub menu pops up - to let me 'edit','remove' ...
>
> > how to implement that? I was confused for a long time!
>
> Use Menu#addSubMenu().
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
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