Code example for AsyncTaskLoader

0
	 * The techniques used are exactly as described in the article. 
	 */ 
 
	public MyLoader( Activity activity )
	{ 
		super( activity );
		progress = (ProgressBar) activity.findViewById( R.id.loaderProgress );
	} 
 
	@Override 
	public String loadInBackground()
	{ 
		progress.setMax( 4 );
		for ( int i = 0; i < 5; i++ )
		{ 
			progress.setProgress( i );
			try 
			{ 
				Thread.sleep( 2000 );
			} 
Connect your IDE to all the code out there  Get Codota for Java