android - picasso 图像自己旋转

标签 android picasso

我按如下方式使用 Picasso 库,但是当我拍摄图像并将其放入 ImageView 时,图像会旋转。我想知道是什么导致了这个问题?

 <ImageView
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:id="@+id/imageViewUser"
    android:background="@color/colorAccent"
    android:contentDescription="@string/description" />

 imageViewUser = (ImageView) findViewById(R.id.imageViewUser);

 Picasso.get().load(url).placeholder(R.drawable.image)
              .error(R.drawable.blank_profile)
              .resize(100, 100)
              .centerCrop()
              .memoryPolicy(MemoryPolicy.NO_CACHE, MemoryPolicy.NO_STORE)
              .networkPolicy(NetworkPolicy.NO_CACHE, NetworkPolicy.NO_STORE)
              .into(imageViewUser);

最佳答案

有时它会发生在某些三星设备上。一种方法是手动旋转所需的图像。阅读更多 Photo rotated from camera (SAMSUNG device)

关于android - picasso 图像自己旋转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56894398/

相关文章:

layout - Android 限定符不适用于概念墨水亚当

android - 如何以编程方式将调用转发到android中的语音邮件

html - 我如何设置 HTML INPUT 标签的样式,以便它在专注于 Android 2.2+ 时保持 CSS?

android - 将 Snackbar 移到 bottomNavigationView 上方

Android: picasso 加载图片失败。如何显示错误信息

android - OkHttp + picasso + 改造

android - picasso 图像加载以前缓存的图像

android - 无法将带有 Picasso 的图像加载到 fragment View 中

android - 看不到第二个按钮

android - 使用 Picasso 将背景图片添加到 Android ListView