One thing to be aware of is that if your panel is not full screen size, buttons visible on the activity, or a panel below the menu will still be active and clickable.
One way to stop this is to make the pop up panel transparent and the full size of the screen. Then intercept clicks to the background buttons with click and long_click subs for the pop up panel. They can be empty, but just need to be there so the buttons below don't get the clicks.
If you want to see a panel, add a second one which is visible and the colour and size you want and then put the menu items on that.
Steve