Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.koushikdutta.ion.builder;
  
  import  android.graphics.drawable.Drawable;
  import  android.view.animation.Animation;

Created by koush on 5/30/13.
  
  public interface ImageViewBuilder<I extends ImageViewBuilder<?>> {
    
Set a placeholder on the ImageView while the request is loading

Parameters:
drawable
Returns:
 
     public I placeholder(Drawable drawable);

    
Set a placeholder on the ImageView while the request is loading

Parameters:
resourceId
Returns:
 
     public I placeholder(int resourceId);

    
Set an error image on the ImageView if the request fails to load

Parameters:
drawable
Returns:
 
     public I error(Drawable drawable);

    
Set an error image on the ImageView if the request fails to load

Parameters:
resourceId
Returns:
 
     public I error(int resourceId);

    
If an ImageView is loaded successfully from a remote source or file storage, animate it in using the given Animation. The default animation is to fade in.

Parameters:
in Animation to apply to the ImageView after the request has loaded and the Bitmap has been retrieved.
Returns:
 
     public I animateIn(Animation in);

    
If an ImageView is loaded successfully from a remote source or file storage, animate it in using the given Animation resource. The default animation is to fade in.

Parameters:
animationResource Animation resource to apply to the ImageView after the request has loaded and the Bitmap has been retrieved.
Returns:
 
     public I animateIn(int animationResource);

    
If the ImageView needs to load from a remote source or file storage, the given Animation will be used while it is loading.

Parameters:
load Animation to apply to the imageView while the request is loading.
Returns:
 
     public I animateLoad(Animation load);

    
If the ImageView needs to load from a remote source or file storage, the given Animation resource will be used while it is loading.

Parameters:
animationResource Animation resource to apply to the imageView while the request is loading.
Returns:
 
     public I animateLoad(int animationResource);

    
Configure the fadeIn when the image loads.

Returns:
 
     public I fadeIn(boolean fadeIn);

    
Flag to enable or disable animation of GIFs

Parameters:
mode
Returns:
 
     public I animateGif(AnimateGifMode mode);

    
Load the ImageView with a deep zoomable image. This allows extremely large images to be loaded, at full fidelity. Only portions of the image will be decoded, on an as needed basis when rendering. This only works on API level 10+, where BitmapRegionDecoder is available.

Returns:
 
     public I deepZoom();

    
Crossfade the new image with the existing image.

Returns:
 
    public I crossfade(boolean crossfade);
New to GrepCode? Check out our FAQ X