Android ConstraintLayout vs iOS AutoLayout

開始覺得autoresize不錯,不過對Android中的ConstraintLayout還是念念不忘,原來iOS有類似的名字叫AutoLayout。那麼就站在Android工程師的角度列個對照表:

中文 ConstraintLayout AutoLayout 備註
左側 Start Leading space 5
右側 End Trailing space 5
上側 Top Top space 5
下側 Bottom Bottom space 5
垂直居中 Start Leading space 5
水平居中 End Trailing space 5
跟隨Constraint match_constraint 默認 5
包裹內容 wrap_content intrinsic content size Edit->Size fit content

網頁佈局中的CSS真是難用,雖然有Flex,但也沒有像ConstraintLayout這樣把佈局技術平民化,任何工種都可以上手。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章