Cancel Prefetch Requests
In my app I was prefetching images so they load faster when user scrolls using prefetchToBitmapCache. Now when user applies a filter, these prefetches remain in pipeline and slow down the loading of new images.
How I am prefetching: When use scrolls down through images, I prefetch X number of images after LinearLayoutManager.findLastVisibleItemPosition()'s value. I need a way to cancel all these prefetches when user applies a filter. Is there a way to do this or a better way of prefetching?
Answered on stack overflow: http://stackoverflow.com/a/34076700/3027862
I tried this today but unfortunately it didn't work. I get true from DataSource.close() but the request still finishes and image is downloaded
Ping! I tried it in a separate but it still didn't work. Any idea why?