How does setting baselineAligned to false improve performance in LinearLayout?

I was just building some UI in xml, and Lint gave me a warning and said to set android:baselineAligned to false to improve performance in ListView.

The docs for the Lint changes that added this warning say

Layout performance: Finds LinearLayouts with weights where you should
set android:baselineAligned=”false” for better performance, and also
finds cases where you have nested weights which can cause performance
problems.

Can somebody explain why this improves performance, specifically when weight is involved?

3 Answers
3

Leave a Comment