private void restartLoader() { if (cursorValid == null) { return; } // Refresh the message list LoaderManager loaderManager = getLoaderManager(); for (int i = 0; i < accountUuids.length; i++) { loaderManager.restartLoader(i, null, this); cursorValid[i] = false; } }
@Override public boolean onQueryTextChange(String newText) { currentFilter = newText; getLoaderManager().restartLoader(0, null, this); return true; }
@Override protected void performFiltering(@NonNull CharSequence text, int start, int end, int keyCode) { if (loaderManager == null) { return; } String query = text.subSequence(start, end).toString(); if (TextUtils.isEmpty(query) || query.length() < MINIMUM_LENGTH_FOR_FILTERING) { loaderManager.destroyLoader(LOADER_ID_FILTERING); return; } Bundle args = new Bundle(); args.putString(ARG_QUERY, query); loaderManager.restartLoader(LOADER_ID_FILTERING, args, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
/** * This method is called after this activity has been paused or restarted. * Often, this is after new data has been inserted through an AddTaskActivity, * so this restarts the loader to re-query the underlying data for any changes. */ @Override protected void onResume() { super.onResume(); // re-queries for all tasks getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this); }
private void showAlternates(Recipient recipient) { if (loaderManager == null) { return; } InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(getWindowToken(), 0); alternatesPopupRecipient = recipient; loaderManager.restartLoader(LOADER_ID_ALTERNATES, null, RecipientSelectView.this); }
private void reSort() { int toastString = sortTypeToastProvider.getToast(sortType, sortAscending); Toast toast = Toast.makeText(getActivity(), toastString, Toast.LENGTH_SHORT); toast.show(); LoaderManager loaderManager = getLoaderManager(); for (int i = 0, len = accountUuids.length; i < len; i++) { loaderManager.restartLoader(i, null, this); } }
@Override protected void onResume() { super.onResume(); getSupportLoaderManager().restartLoader(0, null, this); }
private void startOrResumeDecodeMessage() { LocalMessageExtractorLoader loader = (LocalMessageExtractorLoader) loaderManager.<MessageViewInfo>getLoader(DECODE_MESSAGE_LOADER_ID); boolean isLoaderStale = (loader == null) || !loader.isCreatedFor(localMessage, messageCryptoAnnotations); if (isLoaderStale) { Timber.d("Creating new decode message loader"); loaderManager.restartLoader(DECODE_MESSAGE_LOADER_ID, null, decodeMessageLoaderCallback); } else { Timber.d("Reusing decode message loader"); loaderManager.initLoader(DECODE_MESSAGE_LOADER_ID, null, decodeMessageLoaderCallback); } }
private void startOrResumeLocalMessageLoader() { LocalMessageLoader loader = (LocalMessageLoader) loaderManager.<LocalMessage>getLoader(LOCAL_MESSAGE_LOADER_ID); boolean isLoaderStale = (loader == null) || !loader.isCreatedFor(messageReference); if (isLoaderStale) { Timber.d("Creating new local message loader"); cancelAndClearCryptoOperation(); cancelAndClearDecodeLoader(); loaderManager.restartLoader(LOCAL_MESSAGE_LOADER_ID, null, localMessageLoaderCallback); } else { Timber.d("Reusing local message loader"); loaderManager.initLoader(LOCAL_MESSAGE_LOADER_ID, null, localMessageLoaderCallback); } }