I’m making a game with OpenGL Es 1.1 and i want to implement back button or menu button functionality to my game.(I mean hardware buttons).I have some subClasses so what i have to do when i want to handle hardware button press from subClasses?
Share
You need to implement an onKeyDown listener and check to see what key is pressed.
Sample:
Also note that for the back and menu buttons to fire reliably, you need to set
setFocusableInTouchModetotrue. See the devguide here (scroll down to “Touch Mode”).