public class ImageHolder
extends java.lang.Object
| Constructor and Description |
|---|
ImageHolder(android.graphics.Bitmap bitmap) |
ImageHolder(android.graphics.drawable.Drawable icon) |
ImageHolder(int iconRes) |
ImageHolder(java.lang.String url) |
ImageHolder(android.net.Uri uri) |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyDecidedIconOrSetGone(ImageHolder imageHolder,
android.widget.ImageView imageView,
int iconColor,
boolean tint)
decides which icon to apply or hide this view
|
static void |
applyMultiIconTo(android.graphics.drawable.Drawable icon,
int iconColor,
android.graphics.drawable.Drawable selectedIcon,
int selectedIconColor,
boolean tinted,
android.widget.ImageView imageView)
a small static helper to set a multi state drawable on a view
|
static boolean |
applyTo(ImageHolder imageHolder,
android.widget.ImageView imageView)
a small static helper to set the image from the imageHolder nullSave to the imageView
|
static boolean |
applyTo(ImageHolder imageHolder,
android.widget.ImageView imageView,
java.lang.String tag)
a small static helper to set the image from the imageHolder nullSave to the imageView
|
boolean |
applyTo(android.widget.ImageView imageView)
sets an existing image to the imageView
|
boolean |
applyTo(android.widget.ImageView imageView,
java.lang.String tag)
sets an existing image to the imageView
|
static void |
applyToOrSetGone(ImageHolder imageHolder,
android.widget.ImageView imageView)
a small static helper to set the image from the imageHolder nullSave to the imageView and hide the view if no image was set
|
static void |
applyToOrSetGone(ImageHolder imageHolder,
android.widget.ImageView imageView,
java.lang.String tag)
a small static helper to set the image from the imageHolder nullSave to the imageView and hide the view if no image was set
|
static void |
applyToOrSetInvisible(ImageHolder imageHolder,
android.widget.ImageView imageView)
a small static helper to set the image from the imageHolder nullSave to the imageView and hide the view if no image was set
|
static void |
applyToOrSetInvisible(ImageHolder imageHolder,
android.widget.ImageView imageView,
java.lang.String tag)
a small static helper to set the image from the imageHolder nullSave to the imageView and hide the view if no image was set
|
android.graphics.drawable.Drawable |
decideIcon(android.content.Context ctx,
int iconColor,
boolean tint)
this only handles Drawables
|
static android.graphics.drawable.Drawable |
decideIcon(ImageHolder imageHolder,
android.content.Context ctx,
int iconColor,
boolean tint)
a small static helper which catches nulls for us
|
android.graphics.Bitmap |
getBitmap() |
android.graphics.drawable.Drawable |
getIcon() |
int |
getIconRes() |
android.net.Uri |
getUri() |
void |
setBitmap(android.graphics.Bitmap mBitmap) |
void |
setIcon(android.graphics.drawable.Drawable mIcon) |
void |
setIconRes(int mIconRes) |
void |
setUri(android.net.Uri mUri) |
public ImageHolder(java.lang.String url)
public ImageHolder(android.net.Uri uri)
public ImageHolder(android.graphics.drawable.Drawable icon)
public ImageHolder(android.graphics.Bitmap bitmap)
public ImageHolder(int iconRes)
public android.net.Uri getUri()
public void setUri(android.net.Uri mUri)
public android.graphics.drawable.Drawable getIcon()
public void setIcon(android.graphics.drawable.Drawable mIcon)
public android.graphics.Bitmap getBitmap()
public void setBitmap(android.graphics.Bitmap mBitmap)
public int getIconRes()
public void setIconRes(int mIconRes)
public boolean applyTo(android.widget.ImageView imageView)
imageView - public boolean applyTo(android.widget.ImageView imageView,
java.lang.String tag)
imageView - tag - used to identify imageViews and define different placeholderspublic android.graphics.drawable.Drawable decideIcon(android.content.Context ctx,
int iconColor,
boolean tint)
ctx - iconColor - tint - public static boolean applyTo(ImageHolder imageHolder, android.widget.ImageView imageView)
imageHolder - imageView - public static boolean applyTo(ImageHolder imageHolder, android.widget.ImageView imageView, java.lang.String tag)
imageHolder - imageView - tag - used to identify imageViews and define different placeholderspublic static void applyToOrSetInvisible(ImageHolder imageHolder, android.widget.ImageView imageView)
imageHolder - imageView - public static void applyToOrSetInvisible(ImageHolder imageHolder, android.widget.ImageView imageView, java.lang.String tag)
imageHolder - imageView - tag - used to identify imageViews and define different placeholderspublic static void applyToOrSetGone(ImageHolder imageHolder, android.widget.ImageView imageView)
imageHolder - imageView - public static void applyToOrSetGone(ImageHolder imageHolder, android.widget.ImageView imageView, java.lang.String tag)
imageHolder - imageView - tag - used to identify imageViews and define different placeholderspublic static android.graphics.drawable.Drawable decideIcon(ImageHolder imageHolder, android.content.Context ctx, int iconColor, boolean tint)
imageHolder - ctx - iconColor - tint - public static void applyDecidedIconOrSetGone(ImageHolder imageHolder, android.widget.ImageView imageView, int iconColor, boolean tint)
imageHolder - imageView - iconColor - tint - public static void applyMultiIconTo(android.graphics.drawable.Drawable icon,
int iconColor,
android.graphics.drawable.Drawable selectedIcon,
int selectedIconColor,
boolean tinted,
android.widget.ImageView imageView)
icon - iconColor - selectedIcon - selectedIconColor - tinted - imageView -