Code example for CursorLoader

Methods: cancelLoad

0
	 * Must be called from the UI thread 
	 */ 
	@Override 
	protected void onStopLoading() { 
		// Attempt to cancel the current load task if possible. 
		cancelLoad();
	} 
 
	@Override 
	public void onCanceled(Cursor cursor) {
		if (cursor != null && !cursor.isClosed()) {
			cursor.close();
		} 
	} 
 
	@Override 
	protected void onReset() { 
		super.onReset(); 
 
		// Ensure the loader is stopped 
		onStopLoading();