How to remove focus from SearchView?

前端 未结 10 1497
野趣味
野趣味 2021-02-06 22:20

I want to remove focus and text from SearchView in onResume().

I tried searchView.clearFocus() but it is not working.

Thi

10条回答
  •  渐次进展
    2021-02-06 23:04

    The simplest (and I think, the only 100% working) solution is, to create an invisible LinearLayout. This LinearLayout will grab the focus from the EditText.

提交回复
热议问题