我刚刚用XML构建了一些UI,Lint给了我一个警告,让我将android:baselineAligned设置为false以提高ListView的性能.
添加此警告的Lint更改的文档显示
布局性能:在应该使用权重的位置查找线性布局
有人能解释一下为什么这能提高性能,特别是当涉及体重时?
我刚刚用XML构建了一些UI,Lint给了我一个警告,让我将android:baselineAligned设置为false以提高ListView的性能.
添加此警告的Lint更改的文档显示
布局性能:在应该使用权重的位置查找线性布局
有人能解释一下为什么这能提高性能,特别是当涉及体重时?
By setting android:baselineAligned="false"
, you're preventing the extra work your app's layout has to do in order to Align its children's baselines; which can obviously increase the performance. (Fewer unnecessary operations on UI => Better performance)