[android-developers] Re: ListActivity implements OnItemLongClickListener

2009-10-14 Thread Lee Jarvis
Ok thanks, well I ended up using the following.. AdapterView.AdapterContextMenuInfo info; info = (AdapterView.AdapterContextMenuInfo) menuInfo; ListView lv = getListView(); String title = lv.getItemAtPosition(info.position).toString(); I realize there are other ways of achieving this, what would

[android-developers] Re: ListActivity implements OnItemLongClickListener

2009-10-14 Thread Mark Murphy
Lee Jarvis wrote: > That works great, thankyou. > > One more thing, though. I have tried to mess around with > onContextItemSelected() and attempted to get the original text from > the list item I clicked through the ContextMenuInfo interface, but > there doesn't seem to be a clear way to achieve

[android-developers] Re: ListActivity implements OnItemLongClickListener

2009-10-14 Thread Lee Jarvis
That works great, thankyou. One more thing, though. I have tried to mess around with onContextItemSelected() and attempted to get the original text from the list item I clicked through the ContextMenuInfo interface, but there doesn't seem to be a clear way to achieve this. All I basically need to

[android-developers] Re: ListActivity implements OnItemLongClickListener

2009-10-14 Thread Jason Proctor
the "dialog" that comes up when you long-click on a contact is actually a contextual menu. i've done this in my app for much the same reason and it's straightforward. call activity.registerForContextMenu(view), then implement View.OnCreateContextualMenuListener in your activity. when the user