Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Android ImageView visibility and memory usage

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?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading