Hello I have a problem in show a context menu.
I have this methods to implement my menu:
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo)
public boolean onContextItemSelected(MenuItem item)
But when I run the emulator and holds the Menu key, I don’t see my context menu.
I am using a simple layout, without listviews. I dont understand what view I can choose to register my context menu.
Anyone can explain me this better?
You need to call
registerForContextMenu(View v)and pass in your layout view as the parameter.