package de.eightbitboy.hijacr;

import android.app.Application;

import com.crashlytics.android.Crashlytics;
import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiskCache;
import com.nostra13.universalimageloader.cache.disc.naming.HashCodeFileNameGenerator;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

import io.fabric.sdk.android.Fabric;

public class HijacrApplication extends Application {
	@Override
	public void onCreate() {
		super.onCreate();

		Fabric.with(this, new Crashlytics());

		ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
				.memoryCacheExtraOptions(2048, 2048)
						//TODO use getFilesDir?
				.diskCache(new UnlimitedDiskCache(getCacheDir()))
				.diskCacheFileNameGenerator(new HashCodeFileNameGenerator())
						//.defaultDisplayImageOptions()
				.writeDebugLogs()
				.build();

		ImageLoader.getInstance().init(config);
	}
}

@@ -265,16 +265,83 @@
 erator;%0A
+import com.nostra13.universalimageloader.core.DisplayImageOptions;%0A
 import c
@@ -391,16 +391,16 @@
 Loader;%0A
-
 import c
@@ -650,24 +650,241 @@
 lytics());%0A%0A
+%09%09DisplayImageOptions options = new DisplayImageOptions.Builder()%0A%09%09%09%09.cacheInMemory(true)%0A%09%09%09%09.cacheOnDisk(true)%0A%09%09%09%09%09%09//TODO experiment with bitmap config%0A%09%09%09%09%09%09//.bitmapConfig(Bitmap.Config.RGB_565)%0A%09%09%09%09.build();%0A%0A
 %09%09ImageLoade
@@ -1144,20 +1144,16 @@
 ())%0A%09%09%09%09
-%09%09//
 .default
@@ -1172,16 +1172,23 @@
 Options(
+options
 )%0A%09%09%09%09.w

Enable disk and memory caching