Skip to content

Instantly share code, notes, and snippets.

@shakil807g
Created February 15, 2017 20:00
Show Gist options
  • Save shakil807g/0ea75c711c60eddc218b7ec17b5b5afe to your computer and use it in GitHub Desktop.
Save shakil807g/0ea75c711c60eddc218b7ec17b5b5afe to your computer and use it in GitHub Desktop.
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
Picasso picasso = new Picasso.Builder(getApplicationContext())
.downloader(new OkHttp3Downloader(this))
.build();
//picasso.setIndicatorsEnabled(true);
try {
Picasso.setSingletonInstance(picasso);
} catch (IllegalStateException ignored) {
// Picasso instance was already set
// cannot set it after Picasso.with(Context) was already in use
}
Picasso.with(mactivity)
.load(new File(imagelist.get(position)))
.fit()
.tag(this)
.into(holder.imageView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment