-
public final class MemorySizeCalculator.BuilderConstructs an MemorySizeCalculator with reasonable defaults that can be optionallyoverridden.
-
-
Field Summary
Fields Modifier and Type Field Description floatmemoryCacheScreensfloatbitmapPoolScreensfloatmaxSizeMultiplierfloatlowMemoryMaxSizeMultiplier
-
Constructor Summary
Constructors Constructor Description MemorySizeCalculator.Builder(Context context)
-
Method Summary
Modifier and Type Method Description MemorySizeCalculator.BuildersetMemoryCacheScreens(float memoryCacheScreens)Sets the number of device screens worth of pixels the should be able to hold and returns thisBuilder. MemorySizeCalculator.BuildersetBitmapPoolScreens(float bitmapPoolScreens)Sets the number of device screens worth of pixels the should be able to hold and returnsthis Builder. MemorySizeCalculator.BuildersetMaxSizeMultiplier(float maxSizeMultiplier)Sets the maximum percentage of the device's memory class for standard devices that can betaken up by ImageModule com.mobwith.imgmodule.load.engine.cache.MemoryCache and put together, and returns thisbuilder. MemorySizeCalculator.BuildersetLowMemoryMaxSizeMultiplier(float lowMemoryMaxSizeMultiplier)Sets the maximum percentage of the device's memory class for low ram devices that can betaken up by ImageModule com.mobwith.imgmodule.load.engine.cache.MemoryCache and put together, and returns thisbuilder. MemorySizeCalculator.BuildersetArrayPoolSize(int arrayPoolSizeBytes)Sets the size in bytes of the com.mobwith.imgmodule.load.engine.bitmap_recycle.ArrayPool to use to store temporary arrays while decoding data and returns this builder. MemorySizeCalculatorbuild()-
-
Constructor Detail
-
MemorySizeCalculator.Builder
MemorySizeCalculator.Builder(Context context)
-
-
Method Detail
-
setMemoryCacheScreens
MemorySizeCalculator.Builder setMemoryCacheScreens(float memoryCacheScreens)
Sets the number of device screens worth of pixels the should be able to hold and returns thisBuilder.
-
setBitmapPoolScreens
MemorySizeCalculator.Builder setBitmapPoolScreens(float bitmapPoolScreens)
Sets the number of device screens worth of pixels the should be able to hold and returnsthis Builder.
-
setMaxSizeMultiplier
MemorySizeCalculator.Builder setMaxSizeMultiplier(float maxSizeMultiplier)
Sets the maximum percentage of the device's memory class for standard devices that can betaken up by ImageModule com.mobwith.imgmodule.load.engine.cache.MemoryCache and put together, and returns thisbuilder.
-
setLowMemoryMaxSizeMultiplier
MemorySizeCalculator.Builder setLowMemoryMaxSizeMultiplier(float lowMemoryMaxSizeMultiplier)
Sets the maximum percentage of the device's memory class for low ram devices that can betaken up by ImageModule com.mobwith.imgmodule.load.engine.cache.MemoryCache and put together, and returns thisbuilder.
-
setArrayPoolSize
MemorySizeCalculator.Builder setArrayPoolSize(int arrayPoolSizeBytes)
Sets the size in bytes of the com.mobwith.imgmodule.load.engine.bitmap_recycle.ArrayPool to use to store temporary arrays while decoding data and returns this builder.
This number will be halved on low memory devices that return
{@code true}from .
-
build
MemorySizeCalculator build()
-
-
-
-