Android - how to disable long press on Search button (Nexus One)
问题 The Android documentation describes how to disable the search the search feature in Activity: public boolean onSearchRequested() { return false; } This works fine for a short press of the search button on the Nexus One. However, it doesn't disable the long press, which still fires off a voice search. How do I disable the long press Voice search? Thanks... 回答1: I extended Stan's answer to only disable long press events. @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if