com.bumptech.glide.load.engine.cache.DiskCacheAdapter Java Examples

The following examples show how to use com.bumptech.glide.load.engine.cache.DiskCacheAdapter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GlobalApplication.java    From narrate-android with Apache License 2.0 5 votes vote down vote up
private void setupGlide() {
    MemorySizeCalculator calculator = new MemorySizeCalculator(this);
    int defaultMemoryCacheSize = calculator.getMemoryCacheSize();
    int defaultBitmapPoolSize = calculator.getBitmapPoolSize();

    // disable the disk cache because all of our images are already cached on the sd card
    Glide.setup(new GlideBuilder(this)
                    .setDiskCache(new DiskCacheAdapter())
                    .setBitmapPool(new LruBitmapPool(defaultBitmapPoolSize))
                    .setMemoryCache(new LruResourceCache(defaultMemoryCacheSize))
    );
}
 
Example #2
Source File: SignalGlideModule.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
@Override
public DiskCache build() {
  return new DiskCacheAdapter();
}
 
Example #3
Source File: SignalGlideModule.java    From bcm-android with GNU General Public License v3.0 4 votes vote down vote up
@Override
public DiskCache build() {
  return new DiskCacheAdapter();
}
 
Example #4
Source File: SilenceGlideModule.java    From Silence with GNU General Public License v3.0 4 votes vote down vote up
@Override
public DiskCache build() {
  return new DiskCacheAdapter();
}