How to disable QSB..?
Asked Answered
M

2

1

When a user presses the Search hard key on the device, Android shows the Quick Search Bar. How do I disable the Quick Search Bar?

Marrin answered 26/10, 2010 at 12:44 Comment(0)
M
1

In order to completely disabled the Quick Search Bar, override the method onSearchRequested()and return true unconditionally.

Marrin answered 13/12, 2010 at 8:41 Comment(0)
O
1

override onKeyDown in your activity:

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    if (keyCode == KeyEvent.KEYCODE_SEARCH) {            
        return true;
    } else return super.onKeyDown(keyCode, event);
}
Oxysalt answered 26/10, 2010 at 14:18 Comment(1)
Thanks buddy. But I have found a better solution. I have overridden the method onSearchRequested() and returned true from there.Marrin
M
1

In order to completely disabled the Quick Search Bar, override the method onSearchRequested()and return true unconditionally.

Marrin answered 13/12, 2010 at 8:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.