From be2e9e1591ae7bd2a3c144124d1ed82237cfcabf Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 16 Jan 2013 20:20:53 -0800 Subject: Compatibility fixes for ImageLoader on 2.3 and below devices --- subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'subsonic-android/src/github/daneren2005') diff --git a/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java b/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java index f2b5e5f0..06b837e4 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java @@ -28,7 +28,7 @@ import android.media.RemoteControlClient; import android.os.Handler; import android.util.DisplayMetrics; import android.util.Log; -import android.util.LruCache; +import android.support.v4.util.LruCache; import android.view.View; import android.widget.ImageView; import android.widget.TextView; @@ -67,7 +67,7 @@ public class ImageLoader implements Runnable { cache = new LruCache(cacheSize) { @Override protected int sizeOf(String key, Bitmap bitmap) { - return bitmap.getByteCount() / 1024; + return bitmap.getRowBytes() * bitmap.getHeight() / 1024; } @Override -- cgit v1.2.3