Why are nested weights bad for performance? Alternatives?

Nested weights are bad for performance because:

Layout weights require a widget to be measured twice. When a
LinearLayout with non-zero weights is nested inside another
LinearLayout with non-zero weights, then the number of measurements
increase exponentially.

It’s better to use RelativeLayouts and adjust your view according to the places of other views without using specific dpi values.

Leave a Comment