安卓除了有6种最基本的布局线性布局(LinearLayout)、相对布局(RelativeLayout)、帧布局(FrameLayout)、网格布局(GridLayout)、绝对布局(AbsoluteLayout)、表格布局(TableLayout)外还有一些较复杂的布局,如ConstraintLayout。1、优点调整控件的位置和大小时更加灵活,功能更强大。2、继承关系和其他布局一样继承自ViewGroup。3、新特性相对定位:app:layout_constraintLeft_toRightOf="@+id/buttonA" />按钮b的右对齐按钮a坚守“ 做人真诚 · 做事靠谱 · 口碑至上 · 高效敬业 ”的价值观,专业网站建设服务10余年为成都石凉亭小微创业公司专业提供企业网站制作营销网站建设商城网站建设手机网站建设小程序网站建设网站改版,从内容策划、视觉设计、底层架构、网页布局、功能开发迭代于一体的高端网站建设服务。layout_constraintLeft_toLeftOf // 左边左对齐layout_constraintLeft_toRightOf // 左边右对齐layout_constraintRight_toLeftOf // 右边左对齐layout_constraintRight_toRightOf // 右边右对齐layout_constraintTop_toTopOf // 上边顶部对齐layout_constraintTop_toBottomOf // 上边底部对齐layout_constraintBottom_toTopOf // 下边顶部对齐layout_constraintBottom_toBottomOf // 下边底部对齐layout_constraintBaseline_toBaselineOf // 文本内容基准线对齐layout_constraintStart_toEndOf // 起始边向尾部对齐layout_constraintStart_toStartOf // 起始边向起始边对齐layout_constraintEnd_toStartOf // 尾部向起始边对齐layout_constraintEnd_toEndOf // 尾部向尾部对齐外边距:app:layout_constraintLeft_toLeftOf="parent"app:layout_constraintRight_toRightOf="parent/>空间居中效果倾向:app:layout_constraintHorizontal_bias="0.3"app:layout_constraintLeft_toLeftOf="parent"app:layout_constraintRight_toRightOf="parent/>左边占0.3,右边占0.7可见性的表现:尺寸约束:android:minWidth 设置布局的最小宽度android:minHeight 设置布局的最小高度CHAIN:辅助工具: 当前名称:安卓ConstraintLayout布局 文章转载:http://azwzsj.com/article/pojhci.html
坚守“ 做人真诚 · 做事靠谱 · 口碑至上 · 高效敬业 ”的价值观,专业网站建设服务10余年为成都石凉亭小微创业公司专业提供企业网站制作营销网站建设商城网站建设手机网站建设小程序网站建设网站改版,从内容策划、视觉设计、底层架构、网页布局、功能开发迭代于一体的高端网站建设服务。
在线咨询
拨打电话