Closed u-nation closed 6 years ago
By setting visibility to GONE
we're removing the view from the layout hierarchy which means it doesn't participate anymore in layout passes.
This has a much greater benefit to performance than the cost of the setVisibilty
call, moreso in cases of complex child layouts or when there are multiple ExpandableLayouts on screen, e.g. in a recycler view.
Hi, Thanks for the great library.
I think
setVisibility
is redundant.In the case where
setVisibility(GONE)
is called, the height or width has already become 0 and it is already invisible.And It is not preferable to call it every time in terms of performance.
Best,