title: How to implement a Searchview in android?
body: <p>I added some code to oncreate options menu like <a href="http://developer.android.com/training/search/setup.html" rel="nofollow">this</a></p>
  
  <pre><code> SearchManager searchManager =
             (SearchManager) getSystemService(Context.SEARCH_SERVICE);
      SearchView searchView =
              (SearchView) menu.findItem(R.id.search).getActionView();
      searchView.setSearchableInfo(
              searchManager.getSearchableInfo(getComponentName()));
  </code></pre>
  
  <p>Also I created a xml file in xml directory and I did what is said in <a href="http://developer.android.com/training/search/setup.html" rel="nofollow">this</a>.But I don't know how to pass search query and get the result. Executing this getting action bar disappeared.</p>