title: Custom SearchView whole clickable in android
body: <p>I have a <code>SearchView</code> widget in my app, and I want to ask some questions about making it custom. First of all, you can start search only by clicking on search icon, is there any way to make whole <code>SearchView</code> clickable?
  Also, is there a way to make <code>SearchView</code> appear something like this when it is clicked?</p>
  
  <p><a href="https://i.stack.imgur.com/2ixll.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2ixll.png" alt="a busy cat"></a>
  </p>
  
  <p>It is now in this state:</p>
  
  <p><a href="https://i.stack.imgur.com/DdUnT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DdUnT.png" alt="a busy cat"></a>
  </p>
  
  <p>Here is my code:</p>
  
  <pre><code>citySearch = (SearchView) findViewById(R.id.city_search_bar);
  citySearch.setBackgroundResource(R.drawable.search_background);
  citySearch.setOnSearchClickListener(new OnClickListener() {
  
      @Override
      public void onClick(View arg0) {
          citySearch.setIconifiedByDefault(true);
          //citySearch.setIconified(true);
      }
  
  });
  citySearch.setOnQueryTextListener(new OnQueryTextListener() {
  
      @Override
      public boolean onQueryTextChange(String text) {
  
          ((Filterable) cityListView.getAdapter()).getFilter().filter(text);
  
          return false;
      }
  
      @Override
      public boolean onQueryTextSubmit(String text) {
  
          return false;
      }
  
  });
  
  try
  {
      Field searchField = SearchView.class.getDeclaredField("mSearchButton");
      searchField.setAccessible(true);
      ImageView searchBtn = (ImageView)searchField.get(citySearch);
      searchBtn.setImageResource(R.drawable.search_icon);
      searchBtn.setScaleType(ScaleType.FIT_CENTER);
      searchPlate.setBackgroundResource(R.drawable.search_background);
  }
  catch (NoSuchFieldException e)
  {
      Log.e("SEARCHSTYLEERROR",e.getMessage(),e);
  }
  catch (IllegalAccessException e)
  {
      Log.e("SEARCHSTYLEERROR",e.getMessage(),e);
  }
  </code></pre>