public class ReusableBitmapDrawable extends ExpirableBitmapDrawable
ExpirableBitmapDrawable
class that allows keeping track of usage references. This
facilitates the ability to reuse the underlying Bitmaps if no references are active. To safely
use the Drawable first call beginUsingDrawable()
and then check isBitmapValid()
to ensure that the Drawable is still valid. When done using the Drawable you must call
finishUsingDrawable()
to release the reference and allow the Bitmap to be reused later.Constructor and Description |
---|
ReusableBitmapDrawable(android.graphics.Bitmap pBitmap) |
Modifier and Type | Method and Description |
---|---|
void |
beginUsingDrawable() |
void |
finishUsingDrawable() |
boolean |
isBitmapValid() |
android.graphics.Bitmap |
tryRecycle() |
getState, isDrawableExpired, isStateful, setDrawableExpired, setState
applyTheme, canApplyTheme, draw, getAlpha, getBitmap, getChangingConfigurations, getColorFilter, getConstantState, getGravity, getIntrinsicHeight, getIntrinsicWidth, getOpacity, getOutline, getPaint, getTileModeX, getTileModeY, hasAntiAlias, hasMipMap, inflate, isAutoMirrored, isFilterBitmap, mutate, onBoundsChange, onStateChange, setAlpha, setAntiAlias, setAutoMirrored, setColorFilter, setDither, setFilterBitmap, setGravity, setMipMap, setTargetDensity, setTargetDensity, setTargetDensity, setTileModeX, setTileModeXY, setTileModeY, setTintList, setTintMode
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getCurrent, getDirtyBounds, getHotspotBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getPadding, getTransparentRegion, inflate, invalidateSelf, isVisible, jumpToCurrentState, onLayoutDirectionChanged, onLevelChange, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setTint, setVisible, unscheduleSelf
Copyright © 2016. All Rights Reserved.