【发布时间】:2024-01-02 03:04:01
【问题描述】:
我正在 android 中为 imageLoading 制作演示,我首先使用了 UniversalImageLoader 然后 picasso 然后是 ImageLoader 类,但是当我将新图像上传到服务器并成功上传到服务器时当我尝试将其设置为 ImageView 时,之前加载的图像保持不变,它没有改变,我对此感到非常沮丧,浪费了 2 天时间来解决这个问题,但没有运气,请帮助我挽救我的生命。
我的代码如下:
Picasso.with(getApplicationContext())
.load(Pref.getValue(getApplicationContext(),
Const.PREF_PROFILE_PIC, "")).into(iv_profile);
Picasso.with(getApplicationContext())
.load(Pref.getValue(getApplicationContext(),
Const.PREF_COVER_PIC, "")).into(iv_cover);
【问题讨论】:
-
Picasso、UniversalImageLoader 或任何其他图像加载库正在使用图像缓存来重新加载图像。所以要么您需要更改新图像的名称或清除图像缓存以加载新图像。
标签: android universal-image-loader picasso