Quellcode durchsuchen

Use ARGB8888 for covers. Fix buttons background

inorichi vor 9 Jahren
Ursprung
Commit
2f66b6e56c

+ 5 - 0
app/src/main/AndroidManifest.xml

@@ -66,6 +66,11 @@
                 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
             </intent-filter>
         </receiver>
+
+        <meta-data
+            android:name="eu.kanade.mangafeed.data.cache.CoverGlideModule"
+            android:value="GlideModule" />
+
     </application>
 
 </manifest>

+ 21 - 0
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) {
+
+    }
+}

+ 0 - 1
app/src/main/res/values/styles.xml

@@ -4,7 +4,6 @@
         <item name="colorPrimary">@color/colorPrimary</item>
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
         <item name="colorAccent">@color/colorAccent</item>
-        <item name="colorButtonNormal">@color/colorPrimary</item>
         <item name="alertDialogTheme">@style/AlertDialogStyle</item>
         <item name="android:itemTextAppearance">@style/OptionsMenuTextColor</item>
         <item name="android:textColor">@color/primary_text</item>