Copernic Copernic - 1 year ago 72
Android Question

Are the "GONE" views inflated?

I have a huge XML layout, with many

Relative / Linear
layouts, and what I'm doing now is to hide all the layouts I don't need with
setVisibility (View.GONE)
and change their visibility when needed.

My question is : is this method sufficient? are the layouts inflated and rendered so they alter the phone memory and it's performances and time of the activity loading or they are not until I set the visibility to

The layout is getting bigger so I would like to know if I should use
or stay with what I have now.

Answer Source

are the layouts inflated


and rendered

No. They are part of the view hierarchy but are ignored in the rendering passes.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download