From 2f66b6e56c6a57109de58defad1c6a799f73a359 Mon Sep 17 00:00:00 2001 From: inorichi Date: Tue, 5 Jan 2016 15:54:51 +0100 Subject: [PATCH] Use ARGB8888 for covers. Fix buttons background --- app/src/main/AndroidManifest.xml | 5 +++++ .../data/cache/CoverGlideModule.java | 21 +++++++++++++++++++ app/src/main/res/values/styles.xml | 1 - 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/eu/kanade/mangafeed/data/cache/CoverGlideModule.java diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 39d33885e..c6e93a502 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -66,6 +66,11 @@ + + + diff --git a/app/src/main/java/eu/kanade/mangafeed/data/cache/CoverGlideModule.java b/app/src/main/java/eu/kanade/mangafeed/data/cache/CoverGlideModule.java new file mode 100644 index 000000000..1fc485993 --- /dev/null +++ b/app/src/main/java/eu/kanade/mangafeed/data/cache/CoverGlideModule.java @@ -0,0 +1,21 @@ +package eu.kanade.mangafeed.data.cache; + +import android.content.Context; + +import com.bumptech.glide.Glide; +import com.bumptech.glide.GlideBuilder; +import com.bumptech.glide.load.DecodeFormat; +import com.bumptech.glide.module.GlideModule; + +public class CoverGlideModule implements GlideModule { + + @Override + public void applyOptions(Context context, GlideBuilder builder) { + builder.setDecodeFormat(DecodeFormat.PREFER_ARGB_8888); + } + + @Override + public void registerComponents(Context context, Glide glide) { + + } +} diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index ef75f330d..120bfd2c9 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -4,7 +4,6 @@ @color/colorPrimary @color/colorPrimaryDark @color/colorAccent - @color/colorPrimary @style/AlertDialogStyle @style/OptionsMenuTextColor @color/primary_text