Actually I needed to use the view to launch it.. so this worked fine..
thanks for the tip!
protected void onListItemClick(ListView l, View v, int position, long
id) {
super.onListItemClick(l, v, position, id);
v.showContextMenu();
}
On Aug 20, 11:01 am, Nivek <[email protected]> wrote:
> If you use a ListActivity, try calling getListView().showContextMenu()
> in your onListItemClick() implementation.
>
> Nivek
>
> On 20 août, 16:49, Mark Hansen <[email protected]> wrote:
>
> > This maybe against the way the Android team wants this to work, but if
> > not I can't seem to come up with a way to do this.
>
> > Basically I have a list view that I want to create a ContextMenu when
> > onListItemClick received. So when the user clicks on a list item I
> > want them to choose the action from a ContextMenu.
>
> > Anyone have an example of how to do this, I can get it to work with no
> > problems with a long press, but my users are missing the menu and just
> > thinking the ListView does nothing.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---