How to make SearchView always expanded in android?

后端 未结 4 1647
攒了一身酷
攒了一身酷 2021-01-01 08:56

I have SearchView in the top of the layout (not in the action bar), is there anyway to force this View to be always expanded (opened)?

If n

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 09:06

    You can try to use

    searchView.onActionViewExpanded();
    

    and if you do not need keyboard opened

    searchView.clearFocus();
    

提交回复
热议问题