ActionBar always expanded SearchView with the icon inside

前端 未结 3 1361
不知归路
不知归路 2021-01-14 13:37

I have an ActionBar with a SearchView.

I want the search view to always be \"open\" (expanded). Doing that is possible using

mSearchView.setIconifie         


        
3条回答
  •  天命终不由人
    2021-01-14 14:22

    You can just intercept OnClose event:

    searchView.setOnCloseListener(new SearchView.OnCloseListener() {
        @Override
        public boolean onClose() {
            return true;
        }
    });
    

提交回复
热议问题