From df853b06c32c550b83dae8e48f09a1a5cfa341ad Mon Sep 17 00:00:00 2001 From: Adrian Ulrich Date: Mon, 3 Jul 2017 10:48:47 +0200 Subject: [PATCH] increase precision in dpi calculation Some devices have a density like 2.7, so we should use a float to do the calculation --- src/ch/blinkenlights/android/vanilla/CoverCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch/blinkenlights/android/vanilla/CoverCache.java b/src/ch/blinkenlights/android/vanilla/CoverCache.java index 05c2eaac..7d0c026a 100644 --- a/src/ch/blinkenlights/android/vanilla/CoverCache.java +++ b/src/ch/blinkenlights/android/vanilla/CoverCache.java @@ -45,11 +45,11 @@ public class CoverCache { * Returned size of small album covers * 44sp is the width & height of a library row */ - public final static int SIZE_SMALL = 44 * (int)Resources.getSystem().getDisplayMetrics().density; + public final static int SIZE_SMALL = (int)(44 * Resources.getSystem().getDisplayMetrics().density); /** * Returned size of large (cover view) album covers */ - public final static int SIZE_LARGE = 200 * (int)Resources.getSystem().getDisplayMetrics().density; + public final static int SIZE_LARGE = (int)(200 * Resources.getSystem().getDisplayMetrics().density); /** * Use all cover providers to load cover art */