How to implement context menu on key press instead of long click/tap
- by takyon
I have a ListActivity and I want to implement context menu for each of the list elements. I know that the common way to do this is to show the context menu on long click/tap. I want to know if there is a way to show the context menu for each element on a key press(preferably the menu key).
To rephrase my question, how can I trigger the context menu and not the options menu by pressing the menu key(or any other key).