Android Question How to detect menu press, API 14?

rgately

Member
Licensed User
Longtime User
I'm in the process of upgrading my app to, targetSdkVersion="14". Is it possible to detect when someone touches the 3-dot menu button on the Activity Bar?

In the older UI style, I'm able to detect when the menu button was pressed with this statement
B4X:
If KeyCode = KeyCodes.KEYCODE_MENU
in the Activity_KeyPress event.

With the higher API, it appears that touching the menu button does not trigger the Activity_KeyPress event. Is there another way to detect when the menu key is pressed?

I need to know when the menu button is pressed so that I can launch a custom menu instead.

Thanks for any help!
 

rgately

Member
Licensed User
Longtime User
I'm just surprised that Activity_Keypress doesn't recognize when the title bar menu button is pressed. It did before, when the menu button was located on the navigation bar.
 
Upvote 0
Top