ConstraintLayout---ViewGroup

ConstrainLayout是一个允许你用灵活的方法去设置你控件的位置和大小的ViewGroup。

优点
  • 使用根据灵活,可以一个布局就完成界面。不需要像以前那样,layout嵌套layout。
  • 很好的拖拉控件的支持但是本文还是介绍代码的方式。
配置

只要android api超过9,添加依赖,就可以使用ConstrainLayout了。

compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'


posted @ 2017-12-06 12:38  施行  阅读(400)  评论(0编辑  收藏  举报