ImageSource

public final class ImageSource

Helper class used to set the source and additional attributes from a variety of sources. Supports use of a bitmap, asset, resource, external file or any other URI.

When you are using a preview image, you must set the dimensions of the full size image on the ImageSource object for the full size image using the dimensions method.

Functions

Link copied to clipboard
public static ImageSource asset(String assetName)
Create an instance from an asset name.
Link copied to clipboard
public static ImageSource bitmap(Bitmap bitmap)
Provide a loaded bitmap for display.
Link copied to clipboard
public static ImageSource cachedBitmap(Bitmap bitmap)
Provide a loaded and cached bitmap for display.
Link copied to clipboard
public ImageSource dimensions(int sWidth, int sHeight)
Declare the dimensions of the image.
Link copied to clipboard
public ImageSource region(Rect sRegion)
Use a region of the source image.
Link copied to clipboard
public static ImageSource resource(int resId)
Create an instance from a resource.
Link copied to clipboard
public ImageSource tiling(boolean tile)
Enable or disable tiling of the image.
Link copied to clipboard
Disable tiling of the image.
Link copied to clipboard
Enable tiling of the image.
Link copied to clipboard
public static ImageSource uri(Uri uri)
public static ImageSource uri(String uri)
Create an instance from a URI.