8

I'm trying to set up a screen so that when you click on the magnifying 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?

charlest
  • 905
  • 2
  • 10
  • 20

1 Answers1

8

Override the onSearchRequested method of Activity class:

public boolean onSearchRequested() {

        // Do whatever you want here.


        return true;
}
Mudassir
  • 14,250
  • 8
  • 62
  • 86