在 Android Studio 2.2 中可用的所有 ConstraintLayout 属性中,有这两个底部约束和一个基线约束:layout_constraintBottom_toTopOf
layout_constraintBottom_toBottomOf
layout_constraintBaseline_toBaselineOf
似乎并不是每个 View 都有基线。
底部和基线约束之间有什么区别和相似之处?为什么只有某些 View 有基线?
official documentation缺乏这种信息。
编辑
此图像有助于了解基线与基础:
最佳答案
基线用于使 View 从底部到底部的文本
例如在 EditText 中,文本不是底部所以
如果您使用基线,它将位于底部
EditText的正文 不是 EditText 的 查看
更多信息来自 android developer training official website
关于android-layout - 了解constraintBottom 和constraintBaseline,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39802390/