How to implement context menu on key press instead of long click/tap

Posted by takyon on Stack Overflow See other posts from Stack Overflow or by takyon
Published on 2010-06-05T18:56:02Z Indexed on 2010/06/05 19:02 UTC
Read the original article Hit count: 176

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk