Class MemorySizeCalculator
- java.lang.Object
-
- com.bumptech.glide.load.engine.cache.MemorySizeCalculator
-
public final class MemorySizeCalculator extends java.lang.ObjectA 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 static classMemorySizeCalculator.BuilderConstructs anMemorySizeCalculatorwith reasonable defaults that can be optionally overridden.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetArrayPoolSizeInBytes()Returns the recommended array pool size for the device it is run on in bytes.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.
-
-
-
Method Detail
-
getMemoryCacheSize
public int getMemoryCacheSize()
Returns the recommended memory cache size for the device it is run on in bytes.
-
getBitmapPoolSize
public int getBitmapPoolSize()
Returns the recommended bitmap pool size for the device it is run on in bytes.
-
getArrayPoolSizeInBytes
public int getArrayPoolSizeInBytes()
Returns the recommended array pool size for the device it is run on in bytes.
-
-