com.marvinlabs.widget.slideshow.picasso.PicassoResourceBitmapAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of android-slideshow-widget-picasso-plugin Show documentation
Show all versions of android-slideshow-widget-picasso-plugin Show documentation
A plugin that helps integrate the Picasso library with the SlideShow widget library.
The newest version!
package com.marvinlabs.widget.slideshow.picasso;
import android.content.Context;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.RequestCreator;
import java.util.Collection;
/**
* An implementation of GenericPicassoBitmapAdapter to load application resources
*
* Created by Vincent Mimoun-Prat @ MarvinLabs on 29/05/2014.
*/
public class PicassoResourceBitmapAdapter extends GenericPicassoBitmapAdapter {
public PicassoResourceBitmapAdapter(Context context, Collection items) {
super(context, items);
}
@Override
protected RequestCreator createRequestCreator(Picasso picasso, Integer resourceId) {
return picasso.load(resourceId).noFade().skipMemoryCache();
}
}