Hi,

I have a ListView which is populated with items and I would like to be
able to create the context menu based on some information fetched from
the Cursor used to create the row. Is there a preferred approach for
storing a boolean or flag associate with the row? Eg. should it be in
the View? I could make the decision when creating the menu too, but I
need to get a unique id from the row in the ListView

        public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
                ListView listView = (ListView) v;

Also listView.getSelectedItem() seems to return null,
listView.getSelectedItemId() gives a very negative number and
listView.getSelectedView() is null too.

I thought that the mSelectedItem in the listView would be populated
when creating the context menu. Or it could be some typo
somewhere... :)

Thank you for any ideas.


Regards,
Julius.

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