FlexboxLayout学习笔记
http://blog.csdn.net/u012702547/article/details/52293593
Google 出版
1.导入依赖 compile 'com.google.android:flexbox:0.3.2'
2.布局使用 属性
flexWrap:是否换行
值 :wrap换行
nowrap 不换行(默认不换行)
wrap_reverse 将布局倒过来带换行
属性 flexDirection 将子View 横向展开
效果以flexWrap="wrap"为基础
app:flexDirection="column"
app:flexDirection="column_reverse"
app:flexDirection="row" 默认
app:flexDirection="row_reverse"
app:justifyContent="center"
app:justifyContent="flex_end"
app:justifyContent="flex_start" 默认
子元素两端的距离相等,所有子元素两端的距离都相相等(space_around):
app:justifyContent="space_around"
app:justifyContent="space_between"
app:alignContent="space_between"
app:alignContent="space_around"
app:alignContent="flex_start"
app:alignContent="flex_end"
app:alignContent="center"
app:alignContent="stretch"默认
alignItems和以上属性大差小不差
app:alignItems="baseline"
子控件多的属性
app:layout_order="1" 设置属性排列优先级 默认都是1 数值大的往后排
app:layout_flexGrow="0" 类似于权重 默认 都是0