【发布时间】:2017-06-13 12:33:53
【问题描述】:
在使用 Android Studio 时,我遇到了约束布局。我使用下面提到的链接来了解它的所有内容:
但我还有一个小问题。在RelativeLayout中,我们使用android:layout_alignParentBottom、android:layout_alignParentTop等,它们都以android开头。但是在ConstraintLayout中,我们必须使用app:layout_constraintLeft_toRightOf等。
你能解释一下使用app和android前缀的区别以及它们的重要性吗?
【问题讨论】:
-
因为约束布局是支持库的一部分,所以支持的资源值必须单独添加。
标签: android android-layout android-relativelayout android-constraintlayout