Jus*_*ins 5 android android-layout android-view android-constraintlayout
RelativeLayout测量其所有孩子两次.这可能会导致性能问题.约束布局是否仅测量其子项一次?
ConstraintLayout 最多需要两次测量通过.
如果查看ConstraintLayout源代码,您会看到它的onMeasure()方法首先在internalMeasureChildren()实用程序方法中测量其子代.接下来,它评估一些约束.最后,在循环中第二次ConstraintLayout调用child.measure()它的子节点.
来源:反编译类文件,因为此时源不可用.
| 归档时间: |
|
| 查看次数: |
808 次 |
| 最近记录: |