Class MemorySizeCalculator.Builder
java.lang.Object
com.bumptech.glide.load.engine.cache.MemorySizeCalculator.Builder
- Enclosing class:
- MemorySizeCalculator
Constructs an
MemorySizeCalculator with reasonable defaults that can be optionally
overridden.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()setArrayPoolSize(int arrayPoolSizeBytes) Sets the size in bytes of theArrayPoolto use to store temporary arrays while decoding data and returns this builder.setBitmapPoolScreens(float bitmapPoolScreens) Sets the number of device screens worth of pixels theBitmapPoolshould be able to hold and returns this Builder.setLowMemoryMaxSizeMultiplier(float lowMemoryMaxSizeMultiplier) Sets the maximum percentage of the device's memory class for low ram devices that can be taken up by Glide'sMemoryCacheandBitmapPoolput together, and returns this builder.setMaxSizeMultiplier(float maxSizeMultiplier) Sets the maximum percentage of the device's memory class for standard devices that can be taken up by Glide'sMemoryCacheandBitmapPoolput together, and returns this builder.setMemoryCacheScreens(float memoryCacheScreens) Sets the number of device screens worth of pixels theMemoryCacheshould be able to hold and returns this Builder.
-
Constructor Details
-
Builder
-
-
Method Details
-
setMemoryCacheScreens
Sets the number of device screens worth of pixels theMemoryCacheshould be able to hold and returns this Builder. -
setBitmapPoolScreens
Sets the number of device screens worth of pixels theBitmapPoolshould be able to hold and returns this Builder. -
setMaxSizeMultiplier
Sets the maximum percentage of the device's memory class for standard devices that can be taken up by Glide'sMemoryCacheandBitmapPoolput together, and returns this builder. -
setLowMemoryMaxSizeMultiplier
Sets the maximum percentage of the device's memory class for low ram devices that can be taken up by Glide'sMemoryCacheandBitmapPoolput together, and returns this builder.- See Also:
-
setArrayPoolSize
Sets the size in bytes of theArrayPoolto use to store temporary arrays while decoding data and returns this builder.This number will be halved on low memory devices that return
truefromActivityManager.isLowRamDevice(). -
build
-