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 this. All I basically
> need to (lets say, set a favorite) is the title or string of the list
> item I clicked to bring up the context menu.

Inside an onContextItemSelected(MenuItem item) method, you can do:

AdapterView.AdapterContextMenuInfo info=                
(AdapterView.AdapterContextMenuInfo)item.getMenuInfo();

That will give you the ID, position, and View of the row in the ListView
that was long-tapped to bring up the context menu.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.1 Available!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to