Home > Back-end >  Android ImageView visibility and memory usage
Android ImageView visibility and memory usage

Time:08-12

I understand that if I set an ImageView's visibility to "gone" it does not take part in the parent view's layout. However, is the image data still allocated and held in memory, assuming the image src is defined in the view's xml layout?

CodePudding user response:

Simply, Yes.

As this image still attaches in the parent view. If you tried to access this image programmatically you could be able to do so.

If you are able to access the ImageView while it's gone, so it still reserves memory.

  • Related