简体   繁体   English

如何在android中使用滑动暂停图像下载

[英]How to pause image download using glide in android

I want to pause image downloading and resume downloading. 我想暂停图像下载和恢复下载。 Here is my code 这是我的代码

Glide.with(this).load("http://cfile2.uf.tistory.com/image/114DCE3E4D6456E52E6A5F").into(imageView);
Glide.with(this).pauseRequests();

It is supposed to be stopped and it has to be not shown in imageview. 它应该被停止,它必须不在imageview中显示。 (The size of image is 10MB so it's size is big enough it takes for a while to be downloaded). (图像大小为10MB,因此它的大小足够大,需要一段时间才能下载)。 Before the download of this image is completed, I called pasueRequest. 在完成此图像的下载之前,我调用了pasueRequest。 However download never stops and the image shows up on the imageview. 但是,下载永不停止,图像显示在imageview上。

However download never stops and the image shows up on the imageview. 但是,下载永不停止,图像显示在imageview上。

If you know the size of the image already, avoid the loading. 如果您已经知道图像的大小,请避免加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM