【问题标题】:Picasso with recyclerview auto rotates some images毕加索与 recyclerview 自动旋转一些图像
【发布时间】:2021-04-23 03:51:25
【问题描述】:

我遇到了毕加索显示一些图片方向错误而另一些图片方向正确的问题。我旋转了这个:https://imgur.com/BBSKFJm。我见过这样的线程:Picasso displays in wrong orientation 和这个:Why image auto rotate when set to Imageview with Picasso,建议使用来自 https://github.com/zetbaitsu/Compressor 的 Compressor 或手动旋转它。

我希望有一个能够消除从 uri 拉出的标准回收站视图轮播体验的怪异旋转。我也愿意接受保持统一的技术,例如在回收视图中裁剪图像以处理导致此问题的潜在比例问题:Android ImageView Displaying Rotated Images Although Source Is Not Rotated

【问题讨论】:

    标签: android


    【解决方案1】:

    我遇到过这样的问题,我用 Glide 库解决了。

    dependencies {
    
          implementation 'com.github.bumptech.glide:glide:4.11.0'
          annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
     }
    

    只是

     GlideApp.with(context)
             .load("http://via.url.com/300.png")
             .placeholder(R.drawable.placeholder)
             .error(R.drawable.imagenotfound)
             .into(ivImg);
    

    【讨论】:

    • 谢谢!我只需要将GlideApp 更改为Glide
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-26
    • 2020-09-03
    • 1970-01-01
    • 2021-07-26
    相关资源
    最近更新 更多