How do I open the SearchView programmatically?

后端 未结 8 1640
既然无缘
既然无缘 2020-12-02 09:19

There is this widget for the ActionBar which called \'SearchView\'. When it\'s not in use, it looks like this:

\

8条回答
  •  醉酒成梦
    2020-12-02 09:29

    To open up a searchView keeping the close_button in the end use this in onCreate:-

    searchView.findViewById(R.id.search_button).performClick();
    

提交回复
热议问题