handle android keypress for button of device
Hi
I want to handle events of android devices buttons (back,home,menu,search).
How can I replace default action of those button with my own functions?
Thanks.
Also. I have an unanswered problem on this topic:
http://developer.appcelerator.com/question/25911/how-to-show-android-optionmenu-in-front-of-webview-object
4 Answers
-
I know this is an old question. But I was looking for an answer and found that you can listen to window events:
Titanium.UI.Window-objectYou can listen to android:back as well as android:search. Have a look at the UI.Window link.
cheers,
Dan -
i also need to catch the back-button event, is this possible at the moment?
-
appcelerator support team said me on helpdesk that they don't currently have a method for doing that but they can look into adding it to the API. It won't make the 1.4.0 release most likely though.
-
Is there a way to handle key press (right/left/up/down) now in android apps?