Thanks a lot it worked great.
i implemented it like this if any one needs it

AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;

On Oct 22, 2:07 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> Boozel wrote:
> > Can someone please help me find which item was long clicked
> > in this method i need to determine which item was clicked so that if
> > it is a favorite or not already i can change the "Add to Favorites"
> > accordingly.
>
> > public void onCreateContextMenu(ContextMenu menu, View v,
> > ContextMenuInfo menuInfo)
> >    {
> >            super.onCreateContextMenu(menu, v, menuInfo);
> >            menu.setHeaderTitle("Menu");
> >            menu.add(0, 0, 0, "Add to Favorites");
> >    }
>
> Cast menuInfo to an AdapterView.AdapterContextMenuInfo, and you can get
> the _ID, position, and View of the row in your ListView that was
> long-tapped-upon.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training in Germany, 18-22 January 2010:http://bignerdranch.com
--~--~---------~--~----~------------~-------~--~----~
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to