How to disable searchview?

后端 未结 10 1766
别那么骄傲
别那么骄傲 2020-12-19 06:10

Can you help me on how to disable searchview when button is pressed? I\'m trying this code:

searchView.setEnabled(false);
                searchView.setFocu         


        
10条回答
  •  失恋的感觉
    2020-12-19 06:50

    You can use:

    searchView.clearFocus();
    

    and if you want to hide it using:

    searchView.setVisibility(View.GONE);
    

提交回复
热议问题