android - Is there a way to catch the Search key so that the Google Voice Search dialog doesn't appear? -
i'm aware home key cannot caught, , i'm worried long-press on search key "android-os protected" key press. testing, tried catch keys code within activity, not stop google voice search dialog being triggered.
@override public boolean dispatchkeyevent(keyevent event) { return true; }
edit: tested code on nexus one, , blocks key event on phone, still have problem on droid 2. both running froyo 2.2
im not @ pc, im gonna paste search result.
i think you'r looking this:
activity | android developers boolean, onsearchrequested(). hook called when user signals desire start search. http://developer.android.com/reference/android/app/activity.html
Comments
Post a Comment