public class SparseArrayBitmapPool
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SparseArrayBitmapPool.Node |
| Constructor and Description |
|---|
SparseArrayBitmapPool(int capacityBytes,
<any> nodePool) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Empty the pool, recycling all the bitmaps currently in it.
|
android.graphics.Bitmap |
get(int width,
int height) |
int |
getCapacity() |
int |
getSize() |
boolean |
put(android.graphics.Bitmap b)
Adds the given bitmap to the pool.
|
void |
setCapacity(int capacityBytes)
Set the maximum capacity of the pool, and if necessary trim it down to size.
|
public SparseArrayBitmapPool(int capacityBytes,
<any> nodePool)
capacityBytes - Maximum capacity of the pool in bytes.nodePool - Shared pool to use for recycling linked list nodes, or null.public void setCapacity(int capacityBytes)
public int getCapacity()
public int getSize()
public android.graphics.Bitmap get(int width,
int height)
public boolean put(android.graphics.Bitmap b)
public void clear()