private void loadImageViaUnsafeOkHttpPicassoInstance() {
// create Picasso.Builder object
Picasso.Builder picassoBuilder = new Picasso.Builder(context);
// let's change the standard behavior before we create the Picasso instance
// for example, let's switch out the standard downloader for the OkHttpClient
// this OkHttpClient is special since it allows connection to HTTPS urls with a self-signed certificate
picassoBuilder.downloader(new OkHttpDownloader(UnsafeOkHttpClient.getUnsafeOkHttpClient()));
// you could further modify Picasso's behavior here, for example setting a custom cache implementation
// but that would go too far for this tutorial
// Picasso.Builder creates the Picasso object to do the actual requests
Picasso picasso = picassoBuilder.build();
picasso
.load(UsageExampleListView.eatFoodyImages[3])
.into(imageView4);
}
UsageExamplePicassoBuilderBasics.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:android-tutorials-picasso
作者:
评论列表
文章目录