I have an activity which loads pictures in ImageViews with glide. Here is a sample of my glide code:
Glide.with(ImageVOne.getContext())
.load(geo
Here is a sample of my glide code : Glide.with(ImageVOne.getContext()) .load(geoInfo.getPhotoUrl1()) .skipMemoryCache(true) .priority(Priority.NORMAL) .into(ImageVOne);
Your problem is most likely stemming from the this call: Glide.with(ImageVOne.getContext())...
. You don't want to do this because View.getContext()
returns the Application Context
. By using Glide with the Application Context
you're telling Glide to follow the application's lifecycle and not your Activity
's lifecycle, resulting in the Glide image loads never being cancelled or cleared when you back out of said Activity
.
So instead use: Glide.with(MyActivity.this)...
.
Note: Always tie your Glide load requests to the nearest possible lifecycle to ensure that Glide follows the lifecycle that it's being used in