Finally fixed the issue where the artist image loading blocks the image loaders queue. This is done by using a custom Executor which is basically a wrapper for two independent ThreadPoolExecutors.

This commit is contained in:
Karim Abou Zeid 2015-08-29 19:22:50 +02:00
commit 638ab4547c
4 changed files with 65 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import android.app.Application;
import android.content.Context;
import com.crashlytics.android.Crashlytics;
import com.kabouzeid.gramophone.imageloader.PhonographExecutor;
import com.kabouzeid.gramophone.imageloader.PhonographImageDownloader;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
@ -38,6 +39,7 @@ public class App extends Application {
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
.imageDownloader(new PhonographImageDownloader(this))
.taskExecutor(new PhonographExecutor())
.memoryCacheSizePercentage(30)
.build();
ImageLoader.getInstance().init(config);