searchView必须包含在MenuItem中吗?

对不起,我尝试了很多方法,并最终改变了想法。现在我将SearchView放在popupWindow中,我的新查询是当我点击键盘“搜索”按钮时,如何使SearchView消失,(就像下面的代码:SearchView.setVisiable (View.Gone));但如果我这样做,它会出现阴影,而不是searchView @Override public boolean onQueryTextSubmit(String query){searchView.clearFocus(); //searchView.setVisiable(View.Gone)
searchView.setQuery(query,false); 返回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/16595.html

上一篇: Does the searchView must contains in MenuItem?

下一篇: Change searchView threshold