Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide android keyboard in search view

I've used search view in my application. I wonder how to hide the keyboard when i hit the search button on the search view? I have to use the back button to view the results.

like image 907
gie Avatar asked Sep 23 '13 10:09

gie


1 Answers

Here is a similar question: How to dismiss keyboard in Android SearchView?

  @Override
  public boolean onQueryTextSubmit(String query) {
      // Do search.
      searchView.clearFocus();
      return true;
  }
like image 177
Robin Qiu Avatar answered Oct 22 '22 01:10

Robin Qiu