Taras
Taras

Reputation: 2576

Does Android redraw invisible views?

Sorry for silly question, but does Android really redraw views with visibility View.INVISIBLE? Does it affect an overall performance comparing to using View.GONE?

Upvotes: 2

Views: 183

Answers (2)

Deepak Duvedi
Deepak Duvedi

Reputation: 21

Invisible Views are not shown on UI but they are taking the space on screen whereas gone view are not taking the space on screen as well i.e suppose you are having 3 text views in vertical direction and you make middle one invisible then there is a blank space between first and third and if the view for second one is gone then the third one takes the place of second one.

Upvotes: 0

laalto
laalto

Reputation: 152817

Invisible views are measured but not drawn. Gone views are not measured, so there's a performance difference.

Upvotes: 6

Related Questions