print the Glide Exception and style add windowFullScreen in Launcher.App

This commit is contained in:
unknown
2020-02-11 18:51:53 +08:00
parent 6869c155e6
commit ae01e7cfe1
3 changed files with 6 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package com.mogo.utils.glide;
import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -12,6 +13,7 @@ import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.engine.cache.ExternalPreferredCacheDiskCacheFactory;
import com.bumptech.glide.load.engine.cache.LruResourceCache;
import com.bumptech.glide.load.engine.cache.MemoryCache;
import com.bumptech.glide.load.engine.executor.GlideExecutor;
import com.bumptech.glide.module.AppGlideModule;
/**
@@ -32,7 +34,9 @@ public class BaseGlideModule extends AppGlideModule {
*
* 是在sdcard/Android/data/包名/cache/DISK_CACHE_NAME目录当中
*/
builder.setLogLevel(Log.VERBOSE);
builder.setMemoryCache( new LruResourceCache( MEMORY_CACHE_SIZE ) );
builder.setDiskCache( new ExternalPreferredCacheDiskCacheFactory( context, DISK_CACHE_NAME, DISK_CACHE_SIZE ) );
builder.setDiskCacheExecutor(GlideExecutor.newDiskCacheExecutor(GlideExecutor.UncaughtThrowableStrategy.DEFAULT));
}
}