I'm trying to load,remotely,some url's using glide in my recyclerview. It seems glide continues to process requests,based on viewing the internet connection speed which still displays the high rate for up to a minute even after leaving the fragment and moving to a different one(or even leaving the app). This slows down subsequent requests made on the other fragment which I'm currently viewing. I've tried these methods to try stop whatever glide processes ongoing when I leave a fragment but they aren't working:
@Override
public void onViewRecycled(ViewHolder holder) {
super.onViewRecycled(holder);
Glide.clear(holder.mAvatar);
holder.mAvatar.setImageResource(R.drawable.ic_avatar);
And then I set recyclerView.setAdapter(null) in onPause but still it doesn't solve the problem.
I've also tried using Glide.with(context).pauseAllRequests(); in the onViewRecycled,but it also fails.