From 33752bffae7f485bdfa3d86dd30c272b5d1d4da0 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 5 Oct 2020 15:28:01 +0300 Subject: [PATCH] Set preffered pixelformat for SubsamplingScaleImageView --- app/src/main/java/com/keylesspalace/tusky/TuskyApplication.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.kt b/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.kt index 8e5a5dd9..6fa79c71 100644 --- a/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.kt +++ b/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.kt @@ -18,10 +18,12 @@ package com.keylesspalace.tusky import android.app.Application import android.content.Context import android.content.res.Configuration +import android.graphics.Bitmap import android.util.Log import androidx.emoji.text.EmojiCompat import androidx.preference.PreferenceManager import androidx.work.WorkManager +import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView import com.github.piasy.biv.BigImageViewer import com.github.piasy.biv.loader.glide.GlideCustomImageLoader import com.keylesspalace.tusky.components.notifications.NotificationWorkerFactory @@ -77,6 +79,7 @@ class TuskyApplication : Application(), HasAndroidInjector { Log.w("RxJava", "undeliverable exception", it) } + SubsamplingScaleImageView.setPreferredBitmapConfig(Bitmap.Config.ARGB_8888) BigImageViewer.initialize(GlideCustomImageLoader.with(this)) }