0

我正在使用 Volley NetworkImageView 在我的 Android 应用程序中显示图像。图片端点可能会返回 HTTP 200 + 图片或 HTTP 303 + 重定向 URL。

我搜索了 Volley 文档,但没有找到在 NetworkImageView 中启用重定向的方法。

有谁知道该怎么做?

任何帮助表示赞赏。

4

1 回答 1

0

使用gilde加载照片不是更好吗?

或者使用 Gradle:

repositories {
  mavenCentral()
  google()
}

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

在活动或任何事情中使用:

Glide
    .with(context)
    .load(url)
    .centerCrop()
    .placeholder(R.drawable.imageload)
    .into(myImageView);

一样容易

于 2020-05-28T11:41:35.483 回答