increase precision in dpi calculation

Some devices have a density like 2.7, so we should use a float to do the calculation
This commit is contained in:
Adrian Ulrich 2017-07-03 10:48:47 +02:00
parent 53f097b469
commit df853b06c3

View File

@ -45,11 +45,11 @@ public class CoverCache {
* Returned size of small album covers * Returned size of small album covers
* 44sp is the width & height of a library row * 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 * 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 * Use all cover providers to load cover art
*/ */