INNER CODE UNIT · Java
CustomGlideModule
UnevenSoftware/LeafPic · app/src/main/java/org/horaapps/leafpic/CustomGlideModule.java:13
public class CustomGlideModule implements com.bumptech.glide.module.GlideModule {
@Override
public void registerComponents(Context context, Glide glide, Registry registry) {
}
@Override
public void applyOptions(Context context, GlideBuilder builder) {
// Apply options to the builder here.
/*builder.setDecodeFormat(DecodeFormat.PREFER_ARGB_8888);
MemorySizeCalculator calculator = new MemorySizeCalculator(context);
int defaultMemoryCacheSize = calculator.getMemoryCacheSize();
int defaultBitmapPoolSize = calculator.getBitmapPoolSize();
int customMemoryCacheSize = (int) (1.2 * defaultMemoryCacheSize);
int customBitmapPoolSize = (int) (1.2 * defaultBitmapPoolSize);