UsageExamplePicassoBuilderBasics.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:android-tutorials-picasso 作者:
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);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号