@Override
 public void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   // Save SearchView query if possible
   if (mSearchView != null) {
     outState.putString(WISHLIST_PREVIOUS_QUERY, mSearchView.getQuery().toString());
   }
 }
 @Override
 public void onPostExecute(Object... result) {
   isRefreshing = false;
   if (isAttached) {
     swipeRefreshLayout.setRefreshing(false);
     if (result != null && result.length > 0) {
       digitalAssets = (ArrayList) result[0];
       if (adapter != null) {
         adapter.changeDataSet(digitalAssets);
         ((MyAssetsAdapterFilter) ((MyAssetsAdapter) getAdapter()).getFilter())
             .filter(searchView.getQuery().toString());
       }
       showOrHideNoAssetsView(digitalAssets.isEmpty());
     }
   }
 }
 public void onSavedInstanceState(Bundle outState) {
   if (!searchView.isIconified()) {
     outState.putString(SEARCH_VIEW_QUERY, searchView.getQuery().toString());
     outState.putBoolean(SEARCH_VIEW_ICONIFIED, searchView.isIconified());
   }
 }
 private String checkSearchField() {
   String result = searchView.getQuery().toString();
   if (result.equals("")) return null;
   else return result;
 }
Esempio n. 5
0
 @Override
 public boolean onSearchRequested() {
   String searchQuery = (String) mSearchView.getQuery();
   Log.i(LOG_TAG, "Search Query : " + searchQuery);
   return true;
 }