// Path: src/com/it114/android/oneframework/core/data/Config.java
// public class Config {
//     public static final String VERSION = "1.0.0";// framework version
//     public static boolean debug = true;
//     public static   String API_HOST_DEBUG = "";
//     public static    String API_HOST_RELEASE = "";
// 
// 
// }
// 
// Path: src/com/it114/android/oneframework/core/data/Constants.java
// public class Constants {
// 
//     public final static String IMAGE_CACHE_DIR = "_images";
// }
// 
// Path: src/com/it114/android/oneframework/core/util/FileUtil.java
// public class FileUtil {
// 
//     /**
//      * 得到app缓存文件夹，优先使用外部存储设备
//      * @return
//      */
//     public static File getCacheDir(){
//         File cacheDir = OneApplication.getInstance().getCacheDir();
//         if (Environment.getExternalStorageState() == Environment.MEDIA_MOUNTED) {
//             cacheDir = OneApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_PICTURES);
//         }
//         return cacheDir;
//     }
// }


import android.app.Application;
import android.graphics.Bitmap;
import android.os.Environment;
import com.it114.android.oneframework.core.BuildConfig;
import com.it114.android.oneframework.core.data.Config;
import com.it114.android.oneframework.core.data.Constants;
import com.it114.android.oneframework.core.util.FileUtil;
import com.nostra13.universalimageloader.cache.disc.impl.ext.LruDiskCache;
import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator;
import com.nostra13.universalimageloader.cache.memory.impl.UsingFreqLimitedMemoryCache;
import com.nostra13.universalimageloader.cache.memory.impl.WeakMemoryCache;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer;
import java.io.File;
import java.io.IOException;
        initImageLoader();
    }

    public static OneApplication getInstance(){
        return INSTANCE;
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
    }

    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
    }


    private void initImageLoader() {
        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .bitmapConfig(Bitmap.Config.RGB_565)
                .imageScaleType(ImageScaleType.EXACTLY)
                .cacheOnDisc(true)
                .displayer(new FadeInBitmapDisplayer(200))
                .build();
// Path: src/com/it114/android/oneframework/core/data/Config.java
// public class Config {
//     public static final String VERSION = "1.0.0";// framework version
//     public static boolean debug = true;
//     public static   String API_HOST_DEBUG = "";
//     public static    String API_HOST_RELEASE = "";
// 
// 
// }
// 
// Path: src/com/it114/android/oneframework/core/data/Constants.java
// public class Constants {
// 
//     public final static String IMAGE_CACHE_DIR = "_images";
// }
// 
// Path: src/com/it114/android/oneframework/core/util/FileUtil.java
// public class FileUtil {
// 
//     /**
//      * 得到app缓存文件夹，优先使用外部存储设备
//      * @return
//      */
//     public static File getCacheDir(){
//         File cacheDir = OneApplication.getInstance().getCacheDir();
//         if (Environment.getExternalStorageState() == Environment.MEDIA_MOUNTED) {
//             cacheDir = OneApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_PICTURES);
//         }
//         return cacheDir;
//     }
// }


// Path: src/com/it114/android/oneframework/core/OneApplication.java
import android.app.Application;
import android.graphics.Bitmap;
import android.os.Environment;
import com.it114.android.oneframework.core.BuildConfig;
import com.it114.android.oneframework.core.data.Config;
import com.it114.android.oneframework.core.data.Constants;
import com.it114.android.oneframework.core.util.FileUtil;
import com.nostra13.universalimageloader.cache.disc.impl.ext.LruDiskCache;
import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator;
import com.nostra13.universalimageloader.cache.memory.impl.UsingFreqLimitedMemoryCache;
import com.nostra13.universalimageloader.cache.memory.impl.WeakMemoryCache;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer;
import java.io.File;
import java.io.IOException;

        initImageLoader();
    }

    public static OneApplication getInstance(){
        return INSTANCE;
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
    }

    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
    }


    private void initImageLoader() {
        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .bitmapConfig(Bitmap.Config.RGB_565)
                .imageScaleType(ImageScaleType.EXACTLY)
                .cacheOnDisc(true)
                .displayer(new FadeInBitmapDisplayer(200))
                .build();
        File cacheDir = new File(FileUtil.getCacheDir().getAbsolutePath() + "/" + Constants.IMAGE_CACHE_DIR);