1

I have a RecyclerView that uses items containing a CardView which houses an ImageView.

This is all loaded through a standard adapter and works fine, however continued use of the app and scrolling for long periods of time uses a lot of memory.

I would like to know when the items are visible on screen so I can load them and when they aren't I can use .recycle() on the ImageView to free up the memory.

I am using Glide to load the images so loading them up again if they come back on screen is quick as it can be cached

I need to know how to detect this specifically from the Adapter!

Thank you

SuperBale
  • 341
  • 2
  • 8
  • 20

0 Answers0