I would like to show ContextMenu for a custom view that is not part of the AdapterView.
I called
myActivity.registerForContextMenu(myView);
and ContextMenu is already appearing.
But I don't know how to access myView data in
@Override
onContextItemSelected(MenuItem item)
I thought I could create a custom menuInfo in
@Override
onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo)
This is from the documents: "menuInfo - additional information about the item for which the context menu should be displayed. This information will depend on class v.
Can anyone give me a hint?
source
share