ImageView不要更新

时间:2016-06-26 12:36:13

标签: java android memory mobile

我有一个ImageView,每隔“x”秒更新一次, 从服务器获得。

第一次正确更新图片。

但是在下一张图片中还没有更新。

第一张图片是否存储在内存中,我想删除?

代码:

resolve

4 个答案:

答案 0 :(得分:0)

您正在对具有后台优先级的线程进行更新....

你必须在主线程

上运行它

更改此行:

<page-heading title.bind="{ foo, bar, baz }" ...></page-heading>

对此:

holderProfile.setImageBitmap(image);

答案 1 :(得分:0)

设置图像后尝试使用imageView的invalidate()。

答案 2 :(得分:0)

使用notifyDataSetChanged(); 在适配器中更新你的图像。

答案 3 :(得分:0)

holderProfile.invalidate();移除client.get(...)并放在

之前
AsyncHttpClient client = new AsyncHttpClient();

或 你可以尝试这个ImageView not refreshing/reflecting changes