Does the searchView must contains in MenuItem?

sorry,I tried many methods and eventually changed the idea.Now I put the SearchView in popupWindow,My new questition is how to make the SearchView disappearafter when I clicked the keyboard "search" button ,(just as the code like :SearchView.setVisiable(View.Gone));but if I do this ,it will appears a shadows instead of searchView @Override public boolean onQueryTextSubmit(String query) { searchView.clearFocus(); //searchView.setVisiable(View.Gone)
searchView.setQuery(query, false); return false; }

@Override
public boolean onQueryTextChange(String newText) {
    if (TextUtils.isEmpty(newText)) {
       //clear filter
        mListView.clearTextFilter();
    } else {
        //mListView.setFilterText(newText.toString());
       mAdapter.getFilter().filter(newText);
    }
    return true;
}
链接地址: http://www.djcxy.com/p/16596.html

上一篇: 如何强制键盘显示/隐藏?

下一篇: searchView必须包含在MenuItem中吗?