@Override
public void onCreate() {
super.onCreate();
//创建ImageLoader
ImageLoaderConfiguration configuration=ImageLoaderConfiguration.createDefault(this);
ImageLoader.getInstance().init(configuration);
JPushInterface.setDebugMode(true);
JPushInterface.init(this);
}
public static DisplayImageOptions getOptions(){
//常见方法
DisplayImageOptions build = new DisplayImageOptions.Builder()
.showImageOnLoading(R.mipmap.ic_launcher)//未加载时的图片
.showImageForEmptyUri(R.mipmap.ic_launcher)
.showImageOnFail(R.mipmap.ic_launcher)
.cacheInMemory(true)
.cacheOnDisk(true)
.bitmapConfig(Bitmap.Config.RGB_565)/彩
.displayer(new SimpleBitmapDisplayer())
.handler(new Handler())//handler
.build();
return build;
public void onCreate() {
super.onCreate();
//创建ImageLoader
ImageLoaderConfiguration configuration=ImageLoaderConfiguration.createDefault(this);
ImageLoader.getInstance().init(configuration);
JPushInterface.setDebugMode(true);
JPushInterface.init(this);
}
public static DisplayImageOptions getOptions(){
//常见方法
DisplayImageOptions build = new DisplayImageOptions.Builder()
.showImageOnLoading(R.mipmap.ic_launcher)//未加载时的图片
.showImageForEmptyUri(R.mipmap.ic_launcher)
.showImageOnFail(R.mipmap.ic_launcher)
.cacheInMemory(true)
.cacheOnDisk(true)
.bitmapConfig(Bitmap.Config.RGB_565)/彩
.displayer(new SimpleBitmapDisplayer())
.handler(new Handler())//handler
.build();
return build;
}