-
public final class MemorySizeCalculatorA calculator that tries to intelligently determine cache sizes for a given device based on some constants and the devices screen density, width, and height.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMemorySizeCalculator.BuilderConstructs an MemorySizeCalculator with reasonable defaults that can be optionallyoverridden.
-
Field Summary
Fields Modifier and Type Field Description private final intbitmapPoolSizeprivate final intmemoryCacheSize
-
Method Summary
Modifier and Type Method Description intgetBitmapPoolSize()Returns the recommended bitmap pool size for the device it is run on in bytes. intgetMemoryCacheSize()Returns the recommended memory cache size for the device it is run on in bytes. intgetArrayPoolSizeInBytes()Returns the recommended array pool size for the device it is run on in bytes. -
-
Method Detail
-
getBitmapPoolSize
int getBitmapPoolSize()
Returns the recommended bitmap pool size for the device it is run on in bytes.
-
getMemoryCacheSize
int getMemoryCacheSize()
Returns the recommended memory cache size for the device it is run on in bytes.
-
getArrayPoolSizeInBytes
int getArrayPoolSizeInBytes()
Returns the recommended array pool size for the device it is run on in bytes.
-
-
-
-