android.support.constraint.ConstraintLayout
2017-11-15 08:56
106 查看
常用方法
相对位置属性如下:
layout_constraintTop_toTopOf // 将所需视图的顶部与另一个视图的顶部对齐。
layout_constraintTop_toBottomOf // 将所需视图的顶部与另一个视图的底部对齐。
layout_constraintBottom_toTopOf // 将所需视图的底部与另一个视图的顶部对齐。
layout_constraintBottom_toBottomOf // 将所需视图的底部与另一个视图的底部对齐。
layout_constraintLeft_toTopOf // 将所需视图的左侧与另一个视图的顶部对齐。
layout_constraintLeft_toBottomOf // 将所需视图的左侧与另一个视图的底部对齐。
layout_constraintLeft_toLeftOf // 将所需视图的左边与另一个视图的左边对齐。
layout_constraintLeft_toRightOf // 将所需视图的左边与另一个视图的右边对齐。
layout_constraintRight_toTopOf // 将所需视图的右对齐到另一个视图的顶部。
layout_constraintRight_toBottomOf // 将所需视图的右对齐到另一个的底部。
layout_constraintRight_toLeftOf // 将所需视图的右边与另一个视图的左边对齐。
layout_constraintRight_toRightOf // 将所需视图的右边与另一个视图的右边对齐。
Margins属性:同RelativeLayout属性
android:layout_marginStart
android:layout_marginEnd
android:layout_marginLeft
android:layout_marginTop
android:layout_marginRight
android:layout_marginBottom
相对位置属性如下:
layout_constraintTop_toTopOf // 将所需视图的顶部与另一个视图的顶部对齐。
layout_constraintTop_toBottomOf // 将所需视图的顶部与另一个视图的底部对齐。
layout_constraintBottom_toTopOf // 将所需视图的底部与另一个视图的顶部对齐。
layout_constraintBottom_toBottomOf // 将所需视图的底部与另一个视图的底部对齐。
layout_constraintLeft_toTopOf // 将所需视图的左侧与另一个视图的顶部对齐。
layout_constraintLeft_toBottomOf // 将所需视图的左侧与另一个视图的底部对齐。
layout_constraintLeft_toLeftOf // 将所需视图的左边与另一个视图的左边对齐。
layout_constraintLeft_toRightOf // 将所需视图的左边与另一个视图的右边对齐。
layout_constraintRight_toTopOf // 将所需视图的右对齐到另一个视图的顶部。
layout_constraintRight_toBottomOf // 将所需视图的右对齐到另一个的底部。
layout_constraintRight_toLeftOf // 将所需视图的右边与另一个视图的左边对齐。
layout_constraintRight_toRightOf // 将所需视图的右边与另一个视图的右边对齐。
Margins属性:同RelativeLayout属性
android:layout_marginStart
android:layout_marginEnd
android:layout_marginLeft
android:layout_marginTop
android:layout_marginRight
android:layout_marginBottom
相关文章推荐
- failed to resolve com.android.support.constraint:constraint-layout解决办法
- Error:Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2
- Failed to resolve: com.android.support.constraint:constraint-layout:1.0.0-alpha9 <a
- com.android.support.constraint:constraint-layout:1.0.2
- 导入项目出现:Could not find com.android.support.constraint:constraint-layout:2.0.0-alpha8的解决方法
- Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2
- Error:Could not find com.android.support.constraint:constraint-layout:1.0.2.
- Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2
- com.android.support.constraint:constraint-layout
- Could not find com.android.support.constraint:constraint-layout解决方案
- 导入项目出现:Could not find com.android.support.constraint:constraint-layout:2.0.0-alpha8的解决方法
- Android studio gradle (Error:Failed to resolve: com.android.support.constraint:constraint-layout-so)
- Error:Could not find com.android.support.constraint:constraint-layout:1.0.2.
- Android Studio 中出现错误Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2
- 依赖ConstraintLayout报错:Could not find com.android.support.constraint:constraint-layout:1.0.0-beta5
- Android开发:android studio报错: Failed to resolve: com.android.support.constraint:constraint-layout:1.0.
- Failed to resolve: com.android.support.constraint:constraint-layout
- Android Studio - Error: Failed to resolve: com.android.support.constraint:constraint-layout:1.0.0-al
- Could not find com.android.support.constraint:constraint-layout:1.0.2错误的解决
- 找不到依赖包:Could not find com.android.support.constraint:constraint-layout:1.0.1