Created
January 21, 2016 16:18
-
-
Save DiegoBravoF/de3f21cc49775064befc to your computer and use it in GitHub Desktop.
Picasso Implement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.content.Context; | |
| import android.widget.ImageView; | |
| import com.squareup.picasso.Picasso; | |
| import com.squareup.picasso.Transformation; | |
| /** | |
| * Created by Diego on 21/01/2016. | |
| */ | |
| public class PicassoImp implements PicassoWrapper { | |
| Context context; | |
| public PicassoImp(Context context) { | |
| this.context = context; | |
| } | |
| @Override | |
| public void loadfromUrl(String url, ImageView imageView) { | |
| Picasso.with(context).load(url).into(imageView); | |
| } | |
| @Override | |
| public void loadfromUrlwithPlaceholder(String url, ImageView imageView, int placeHolder) { | |
| Picasso.with(context).load(url).placeholder(placeHolder).into(imageView); | |
| } | |
| @Override | |
| public void loadfromUrlwithTransformation(String url, ImageView imageView, Transformation transformation) { | |
| Picasso.with(context).load(url).transform(transformation).into(imageView); | |
| } | |
| @Override | |
| public void loadfromUrlwithPlaceholderwithTransformation(String url, ImageView imageView, int placeHolder, Transformation transformation) { | |
| Picasso.with(context).load(url).placeholder(placeHolder).transform(transformation).into(imageView); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment