I have a List and ContextMenu for that List. Now when I long pressed
on list then onCreateContextMenu ( ...) method is invoked.
 Now I want to know on which list item I long pressed. I had tried but
I got only got index. of that list item. How to get name of that list
item?

public void onCreateContextMenu(ContextMenu menu, View
v,ContextMenuInfo menuInfo)
        {
                try
                {
                    info = (AdapterView.AdapterContextMenuInfo) menuInfo;
                }
                catch (ClassCastException e)
                {
                        e.printStackTrace();
                }
                long id = getListAdapter().getItemId(info.position);
                System.out.println ("^^^"+id);// here id is the index of list 
item
and I want name of this     list item.
}

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