Android user context menu positioning?

I managed to do this for toasts and dialogs, but now there is a context menu problem. Is it possible in Android to position the context menu elsewhere programmatically? I want to be able to specify a position anywhere on the screen as part of the user interface, but I cannot figure out how to do this. Thanks in advance.

+3
source share
1 answer

As I noted in my comment, I went with PopupWindow to actually view the menu. It contained a ListView for menu items with corresponding event listeners. I attached a context menu by overriding the long press listener and adding PopupWindow to event.getRawY().

+1
source

All Articles