Code example for ListFragment

Methods: getLoaderManager, isAdded

0
	@Override 
	public void onLoaderReset(Loader<List<String>> listLoader) {
	} 
 
	private boolean isStreamLoading() { 
		if (isAdded()) {
			final Loader loader = getLoaderManager().getLoader(STREAM_LOADER_ID);
			if (loader != null) {
				return ((StreamLoader) loader).isLoading();
			} 
		} 
		return true; 
	} 
 
	private boolean streamHasMoreResults() { 
		if (isAdded()) {
			final Loader loader = getLoaderManager().getLoader(STREAM_LOADER_ID);
			if (loader != null) {
				return ((StreamLoader) loader).hasMoreResults();
			} 
		} 
		return false; 
	} 
 
	private boolean streamHasError() { 
		if (isAdded()) {
			final Loader loader = getLoaderManager().getLoader(STREAM_LOADER_ID);
			if (loader != null) {
				return ((StreamLoader) loader).hasError();
			} 
		} 
		return false;