Code example for AsyncTaskLoader

Methods: deliverResult, forceLoad

0
ArrayList<Album> oldAlbum = mAlbumList;
		mAlbumList = albumList;
		 
		if(isStarted()) {
			super.deliverResult(albumList);
		} 
		 
		if(oldAlbum != null && oldAlbum != albumList) {
			onReleaseResources(oldAlbum);
		} 
	} 
	 
	protected void onReleaseResources(ArrayList<Album> albumList) {
		// Nothing to do here for a simple List 
	} 
	 
	@Override 
	public void forceLoad() { 
		super.forceLoad(); 
	} 
	 
	@Override 
	protected void onStartLoading() { 
		if(mAlbumList != null) {
Contextual code suggestions in your IDE  Get Codota for Java