You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a view pager in which fragments are loading dynamical (I am using FragmentStatePagerAdapter as there are a lot of fragments depending upon the number of images in the array of images). Each fragment contains an Image View. I am calling Picasso.with(mContext).load(url).into(imageView); it puts the request in a queue, and when I keep scrolling it keeps putting requests in queue. The problem is when internet connection is slow, previous requests take time and current image (on current page) is served after a long time and meanwhile screen shows place holder image. So, my question is ,is there any way to cancel requests made for previous fragments and just execute the current request? Also, at a time view pager is keeping 3 fragments in memory (default behaviour), so if other fragments (off screen fragments) are getting destroyed, does picasso cancel those requests (related to fragments which are getting destroyed) automatically? If these requests are not getting cancelled automatically, is there any way to do that?
I know there are functions to cancle requests but I don't know how to use them in case of view pager as view pager will keep atleast 3 fragments in memory by default.
I am using Picasso 2.4.0. I am not using Picasso 2.5.2 as it has issues in loading camera images (the bug is already locked regarding this camera image issue and I also haven't found any solution yet)
I have a view pager in which fragments are loading dynamical (I am using FragmentStatePagerAdapter as there are a lot of fragments depending upon the number of images in the array of images). Each fragment contains an Image View. I am calling Picasso.with(mContext).load(url).into(imageView); it puts the request in a queue, and when I keep scrolling it keeps putting requests in queue. The problem is when internet connection is slow, previous requests take time and current image (on current page) is served after a long time and meanwhile screen shows place holder image. So, my question is ,is there any way to cancel requests made for previous fragments and just execute the current request? Also, at a time view pager is keeping 3 fragments in memory (default behaviour), so if other fragments (off screen fragments) are getting destroyed, does picasso cancel those requests (related to fragments which are getting destroyed) automatically? If these requests are not getting cancelled automatically, is there any way to do that?
I know there are functions to cancle requests but I don't know how to use them in case of view pager as view pager will keep atleast 3 fragments in memory by default.
I am using Picasso 2.4.0. I am not using Picasso 2.5.2 as it has issues in loading camera images (the bug is already locked regarding this camera image issue and I also haven't found any solution yet)
@JakeWharton Please help me to solve this problem
Thanks and regards
The text was updated successfully, but these errors were encountered: