title: How to display searchview close icon when expanded in android?
body: <p>I have an imageView. When i click image, i am hidding image and enabling searchview in expanded. But problem is close icon is not visible.
  How to make close icon visible when searchview in expanded form?</p>
  
  <p>Here is my piece of code:</p>
  
  <pre><code>  public class HomeActivity extends Activity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);   
   search = (SearchView) findViewById(R.id.search);
      searchImage=(ImageView) findViewById(R.id.search_image);
  
    searchImage.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              search.setVisibility(View.VISIBLE);
              search.setIconifiedByDefault(false); // here i am disabling default icon
              searchImage.setVisibility(View.GONE);
  
          }
      });
  
   //This function not works as close icon not visible.
       search.setOnCloseListener(new OnCloseListener() {
  
          @Override
          public boolean onClose() {
              searchImage.setVisibility(View.VISIBLE);
              return false;
          }
      });
  </code></pre>
  
  <p>Here is screenshot where close icon at top right not visible:
  <img src="https://i.stack.imgur.com/k15eO.png" alt="enter image description here"></p>