Methods Summary |
---|
public E | getTypedDrawable()Get the source drawable for this BitmapDrawableImageView.
try {
return (E) mDrawable;
} catch (Exception ignored) {
return null;
}
|
protected void | onAttachedToWindow()
super.onAttachedToWindow();
mAttachedToWindow = true;
if (mDrawable != null && mDrawable.getKey() == null
&& mDrawable.getPreviousKey() != null) {
mDrawable.bind(mDrawable.getPreviousKey());
}
|
protected void | onDetachedFromWindow()
super.onDetachedFromWindow();
mAttachedToWindow = false;
if (HAS_TRANSIENT_STATE_SUPPORTED && !hasTransientState()) {
unbindDrawable(TEMPORARY);
}
|
public void | setHasTransientState(boolean hasTransientState)
super.setHasTransientState(hasTransientState);
if (!hasTransientState && !mAttachedToWindow) {
unbindDrawable(TEMPORARY);
}
|
public void | setImageBitmap(android.graphics.Bitmap bm)
super.setImageBitmap(bm);
unbindDrawable();
mDrawable = null;
|
public void | setImageDrawable(android.graphics.drawable.Drawable drawable)
super.setImageDrawable(drawable);
unbindDrawable();
mDrawable = null;
|
public void | setImageResource(int resId)
super.setImageResource(resId);
unbindDrawable();
mDrawable = null;
|
public void | setImageURI(android.net.Uri uri)
super.setImageURI(uri);
unbindDrawable();
mDrawable = null;
|
public void | setTypedDrawable(E drawable)Set the given drawable as the source for this BitmapDrawableImageView.
super.setImageDrawable(drawable);
unbindDrawable();
mDrawable = drawable;
|
private void | unbindDrawable()
unbindDrawable(PERMANENT);
|
private void | unbindDrawable(boolean temporary)
if (mDrawable != null) {
mDrawable.unbind(temporary);
}
|