2

我正在使用Volley加载图像。但是,我想在 listview 上暂停图像下载fling

有没有办法Request Queue在 Volley 中暂停/恢复。

谢谢。

4

1 回答 1

3

Volley 的 RequestQueue 有方法start()stop()所以它应该在onScrollStateChanged()下面的方法中被调用:

if (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) {
    mRequestQueue.stop();
} else {
    mRequestQueue.start();
}
于 2014-05-07T15:51:24.383 回答