import java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy; import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer; import android.app.Application; public class My extends Application { @Override public void onCreate() { // TODO Auto-generated method stub //设置默认的方式 ImageLoaderConfiguration img = new ImageLoaderConfiguration.Builder( this).defaultDisplayImageOptions(null).build(); ImageLoader.getInstance().init(img); } public static DisplayImageOptions getOptions() { //设置变成原型
DisplayImageOptions op = new DisplayImageOptions.Builder().displayer( new RoundedBitmapDisplayer(50)).build(); return op; } }