android.support.wearable.view
Class ImageReference

java.lang.Object
  extended by android.support.wearable.view.ImageReference

public class ImageReference
extends java.lang.Object

A reference to an image. This may be only a lightweight reference, or may contain a reference to a Bitmap or other image data if the data is already available in memory.


Field Summary
static ImageReference NONE
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
static ImageReference forBitmap(Bitmap bitmap)
          Creates an instance referencing a Bitmap.
static ImageReference forDrawable(int drawableResId)
          Creates an instance referencing a drawable to be loaded by id.
static ImageReference forImageUri(Uri uri)
          Creates an instance referencing an image to be loaded from the network.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final ImageReference NONE
Method Detail

forImageUri

public static ImageReference forImageUri(Uri uri)
Creates an instance referencing an image to be loaded from the network.

Parameters:
uri - an image of any type supported by BitmapFactory

forDrawable

public static ImageReference forDrawable(int drawableResId)
Creates an instance referencing a drawable to be loaded by id.

Parameters:
drawableResId - a resource id for a drawable

forBitmap

public static ImageReference forBitmap(Bitmap bitmap)
Creates an instance referencing a Bitmap. Only use this if a Bitmap is has already been loaded. for better performance, use a URI or resourceId whenever possible.

Parameters:
bitmap - the bitmap to reference

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object