Android Question menu key event

nikolaus

Member
Licensed User
Longtime User
Is there any way to track menukey_click directly? I'd like to create a popup-menu or start an activity immediately on keypress.

Activity.AddMenuItem needs an aditional click I want to avoid.

Thx Nikolaus
 
You can detect it in Activity_KeyPress. Something like:

Code: Copy
Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event
   
   If KeyCode =  KeyCodes.KEYCODE_MENU
 
   smain.OpenMenu

   Return True
   End If 
 
End Sub
 
Upvote 0
Back
Top