Volley - NetworkImageView sometimes doesn't show the error image?

妖精的绣舞 提交于 2019-12-01 21:09:21

I think the problem is that the volley does not help you to reload the image.

A quick inspection shows that the NetworkImageView only loads data when onLayout method is called and the method loadImageIfNecessary will queue the network request if necessary.

When there is no Internet connection, the error callback will be called and there is no further action once the Internet get itself connected.

However, since you have the NetworkImage in a list, when you scroll the list, I suppose you will reuse the cell view and call setImageURL once again. If the Internet connection is available, the image will be loaded automatically. Alternatively, once the Internet connection is up, you can refresh the list view and so that the image will be loaded automatically.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!