Code example for ImageSwitcher

Methods: setImageDrawable

0
    @Override 
    protected void onPostExecute(Bitmap result) {
	// we check if the user is still looking at the same photo 
	// if not, we don't refresh the main view 
	if (result != null && originalPosition == gallery.getSelectedItemPosition()) {
	    imageSwitcher.setImageDrawable(new BitmapDrawable((Bitmap) result));
	} 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java