@Override public boolean onQueryTextSubmit(String query) { mSearchView.clearFocus(); hideSearchView(); UtilMethods.hideSoftKeyboard(this); fragmentManager = getSupportFragmentManager(); fragmentManager .beginTransaction() .replace(R.id.container, ResultListFragment.newInstance("", query)) .commit(); navigationDepth = 4; searchQueryTitle = query; return false; }
@Override public boolean onQueryTextChange(String newText) { if (newText.length() == 0) { hideSuggestionList(); UtilMethods.hideSoftKeyboard(this); mSearchView.clearFocus(); mCurrentSearchText = null; return false; } if (!TextUtils.isEmpty(newText)) { getSearchSuggestions(newText); mCurrentSearchText = newText; return true; } return false; }