From 68b9ba7b99fd976ee428f50fd909d5562fa4e89b Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 1 Feb 2019 12:32:07 +0100 Subject: [PATCH] Glide : add okhhtp integration and hide logs --- app/build.gradle | 7 +++++-- .../riotredesign/core/glide/MyAppGlideModule.java | 13 ++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1271c1ea..b6a92b73 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -53,6 +53,7 @@ dependencies { def epoxy_version = "3.0.0" def arrow_version = "0.8.2" + def glide_version = "4.8.0" implementation project(":matrix-sdk-android") implementation project(":matrix-sdk-android-rx") @@ -84,8 +85,10 @@ dependencies { implementation "io.arrow-kt:arrow-core:$arrow_version" // UI - implementation 'com.github.bumptech.glide:glide:4.8.0' - kapt 'com.github.bumptech.glide:compiler:4.8.0' + implementation "com.github.bumptech.glide:glide:$glide_version" + implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version" + kapt "com.github.bumptech.glide:compiler:$glide_version" + implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' implementation 'com.google.android.material:material:1.1.0-alpha02' diff --git a/app/src/main/java/im/vector/riotredesign/core/glide/MyAppGlideModule.java b/app/src/main/java/im/vector/riotredesign/core/glide/MyAppGlideModule.java index f88d4f80..08fed579 100644 --- a/app/src/main/java/im/vector/riotredesign/core/glide/MyAppGlideModule.java +++ b/app/src/main/java/im/vector/riotredesign/core/glide/MyAppGlideModule.java @@ -16,8 +16,19 @@ package im.vector.riotredesign.core.glide; +import android.content.Context; +import android.util.Log; + +import com.bumptech.glide.GlideBuilder; import com.bumptech.glide.annotation.GlideModule; import com.bumptech.glide.module.AppGlideModule; @GlideModule -public final class MyAppGlideModule extends AppGlideModule {} \ No newline at end of file +public final class MyAppGlideModule extends AppGlideModule { + + @Override + public void applyOptions(Context context, GlideBuilder builder) { + builder.setLogLevel(Log.ERROR); + } + +} \ No newline at end of file