-
public class ReusableBitmapDrawable extends ExpirableBitmapDrawable
A 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 Summary
Constructors Constructor Description ReusableBitmapDrawable(Bitmap pBitmap)
-
Method Summary
Modifier and Type Method Description voidbeginUsingDrawable()voidfinishUsingDrawable()BitmaptryRecycle()booleanisBitmapValid()-
Methods inherited from class org.osmdroid.tileprovider.ExpirableBitmapDrawable
getState, getState, isDrawableExpired, isStateful, setDrawableExpired, setState, setState -
Methods inherited from class android.graphics.drawable.BitmapDrawable
applyTheme, canApplyTheme, draw, getAlpha, getBitmap, getChangingConfigurations, getColorFilter, getConstantState, getGravity, getIntrinsicHeight, getIntrinsicWidth, getOpacity, getOpticalInsets, getOutline, getPaint, getTileModeX, getTileModeY, hasAntiAlias, hasFocusStateSpecified, hasMipMap, inflate, isAutoMirrored, isFilterBitmap, isStateful, mutate, setAlpha, setAntiAlias, setAutoMirrored, setBitmap, setColorFilter, setDither, setFilterBitmap, setGravity, setMipMap, setTargetDensity, setTileModeX, setTileModeXY, setTileModeY, setTintBlendMode, setTintList -
Methods inherited from class android.graphics.drawable.Drawable
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getBounds, getCallback, getCurrent, getDirtyBounds, getHotspotBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getPadding, getState, getTransparentRegion, invalidateSelf, isProjected, isVisible, jumpToCurrentState, onLayoutDirectionChanged, resolveOpacity, scheduleSelf, setBounds, setCallback, setChangingConfigurations, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintMode, setVisible, unscheduleSelf -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ReusableBitmapDrawable
ReusableBitmapDrawable(Bitmap pBitmap)
-
-
Method Detail
-
beginUsingDrawable
void beginUsingDrawable()
-
finishUsingDrawable
void finishUsingDrawable()
-
tryRecycle
Bitmap tryRecycle()
-
isBitmapValid
boolean isBitmapValid()
-
-
-
-