Example #1
0
 /**
  * Sets the maximum percentage of the device's memory class for low ram devices that can be
  * taken up by Glide's {@link com.bumptech.glide.load.engine.cache.MemoryCache} and {@link
  * com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool} put together, and returns this
  * builder.
  *
  * @see ActivityManager#isLowRamDevice()
  */
 public Builder setLowMemoryMaxSizeMultiplier(float lowMemoryMaxSizeMultiplier) {
   Preconditions.checkArgument(
       lowMemoryMaxSizeMultiplier >= 0 && lowMemoryMaxSizeMultiplier <= 1,
       "Low memory max size multiplier must be between 0 and 1");
   this.lowMemoryMaxSizeMultiplier = lowMemoryMaxSizeMultiplier;
   return this;
 }
Example #2
0
 /**
  * Sets the maximum percentage of the device's memory class for standard devices that can be
  * taken up by Glide's {@link com.bumptech.glide.load.engine.cache.MemoryCache} and {@link
  * com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool} put together, and returns this
  * builder.
  */
 public Builder setMaxSizeMultiplier(float maxSizeMultiplier) {
   Preconditions.checkArgument(
       maxSizeMultiplier >= 0 && maxSizeMultiplier <= 1,
       "Size multiplier must be between 0 and 1");
   this.maxSizeMultiplier = maxSizeMultiplier;
   return this;
 }
Example #3
0
 /**
  * Sets the number of device screens worth of pixels the {@link
  * com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool} should be able to hold and returns
  * this Builder.
  */
 public Builder setBitmapPoolScreens(float bitmapPoolScreens) {
   Preconditions.checkArgument(
       bitmapPoolScreens >= 0, "Bitmap pool screens must be greater than or equal to 0");
   this.bitmapPoolScreens = bitmapPoolScreens;
   return this;
 }
Example #4
0
 /**
  * Sets the number of device screens worth of pixels the {@link
  * com.bumptech.glide.load.engine.cache.MemoryCache} should be able to hold and returns this
  * Builder.
  */
 public Builder setMemoryCacheScreens(float memoryCacheScreens) {
   Preconditions.checkArgument(
       bitmapPoolScreens >= 0, "Memory cache screens must be greater than or equal to 0");
   this.memoryCacheScreens = memoryCacheScreens;
   return this;
 }