Android ConstraintLayout

来源:互联网 发布:ico转换软件 编辑:程序博客网 时间:2024/05/19 02:04

ConstraintLayout

配合Android Studio 2.3版本使用ConstraintLayout即可以节省时间,同时也可以解决复杂布局马嵌套过深引起的性能问题。

那么看一看Android Studio2.3工具给带来的方便性,一些常用的align,chain等方式简单通过这些工具就可以解决。由于使用ConstraintLayout 从0.9beta到目前1.0.4已经很久了,常用的命令也知道,但配合
tool
studio demo

ConstraintLayout的动画,实质是通过TransitionManager配合ContraintLayout布局属性改动达到。
constraint layout animation

可以用来代替LinearLayout
pack chain

ConstraintLayout可用的约束

   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

关于其中具体的学习可以参考下面的4个part学习以及Google官方指导。

参考链接

Constraint Layout ( What the hell is this )
Constraint Layout Concepts ( What the hell is this )[ (Tips and Tricks) [Part 2 ]
Constraint Layout [Animations | Dynamic Constraints | UI by Java] ( What the hell is this )[Part3]
Constraint Layout Visual [Design] Editor ( What the hell is this )[Part4]
Constraint-Layout Google Training


0 0
原创粉丝点击