Beispiel #1
0
 public SliderView(Context context) {
   super(context);
   this.imageLoader = Utils.getImageLoader(context);
   this.context = context;
   DisplayImageOptions displayImageOptions =
       new DisplayImageOptions.Builder()
           .cacheInMemory(true)
           .imageScaleType(ImageScaleType.EXACTLY_STRETCHED)
           .build();
   ImageLoaderConfiguration config =
       new ImageLoaderConfiguration.Builder(context)
           .memoryCache(new WeakMemoryCache())
           .defaultDisplayImageOptions(displayImageOptions)
           .build();
   ImageLoader.getInstance().init(config);
 }
Beispiel #2
0
 public AlbumPagerAdapter(Context context, AlbumResult albumResult) {
   this.images = albumResult.getAlbum().getData().getImages();
   this.mContext = context;
   imageLoader = Utils.getImageLoader(context);
 }