Back to project page MaterialManager.
The source code is released under:
There is no license, someone decided to pretty much republish Cabinet with no credit so I?m taking away the license altogether.
If you think the Android project MaterialManager listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.afollestad.cabinet; //from w ww .ja va 2s .co m import android.app.Application; import com.afollestad.cabinet.utils.APKIconDownloader; import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; /** * @author Aidan Follestad (afollestad) */ public class App extends Application { @Override public void onCreate() { super.onCreate(); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()) .defaultDisplayImageOptions(getDisplayOptions(0)) .imageDownloader(new APKIconDownloader(this)) .build(); ImageLoader.getInstance().init(config); } public static DisplayImageOptions getDisplayOptions(int fallback) { if (fallback == 0) fallback = R.drawable.ic_file_image; return new DisplayImageOptions.Builder() .resetViewBeforeLoading(true) .showImageOnLoading(fallback) // set the default image while loading the thumb .showImageForEmptyUri(fallback) .showImageOnFail(fallback) .cacheInMemory(true) .cacheOnDisk(false) .build(); } }