How to have clicking the phone's search button do nothing?
I'm trying to set up a screen so that when you click on the mag开发者_如何转开发nifying glass at the bottom of the phone it doesn't show the standard search area at the top of the screen: essentially, have it ignore (or catch it so I can do nothing) when the magnifying class is clicked on?
Override the onSearchRequested method of Activity class:
public boolean onSearchRequested() {
// Do whatever you want here.
return true;
}
精彩评论