ConstraintLayout
Nicolas Roard
Google
@camaelon
+NicolasRoard
John Hoford
Google
@johnhoford
+JohnHoford
Slide 2
Slide 2 text
ConstraintLayout
Slide 3
Slide 3 text
Why?
Slide 4
Slide 4 text
Layout
Editor
Slide 5
Slide 5 text
Why creating a new layout?
Slide 6
Slide 6 text
Why creating a new layout?
Visual Editor
Slide 7
Slide 7 text
Why creating a new layout?
Visual Editor
Flexible
Slide 8
Slide 8 text
Why creating a new layout?
Visual Editor
Flexible
Flat layout
Slide 9
Slide 9 text
Why creating a new layout?
Visual Editor
Flexible
Flat layout
Unbundled
Slide 10
Slide 10 text
Why creating a new layout?
Visual Editor
Flexible
Flat layout
Unbundled
Available from API level 9 (99.9% devices)
Slide 11
Slide 11 text
Basics
Slide 12
Slide 12 text
Edge Constraints
Widget
Slide 13
Slide 13 text
Edge Constraints
Widget
Slide 14
Slide 14 text
Edge Constraints
Widget
Slide 15
Slide 15 text
Edge Constraints
Widget
Slide 16
Slide 16 text
Edge Constraints
Widget
Margin
Slide 17
Slide 17 text
Widget
Center Constraints
Slide 18
Slide 18 text
Widget
Center Constraints
Slide 19
Slide 19 text
Widget
Center Constraints
Slide 20
Slide 20 text
RelativeLayout
Slide 21
Slide 21 text
Wrap Content
Slide 22
Slide 22 text
Wrap Content
Slide 23
Slide 23 text
Wrap Content
Slide 24
Slide 24 text
Wrap Content
Slide 25
Slide 25 text
Nested Layouts
Slide 26
Slide 26 text
Nested Layouts
Slide 27
Slide 27 text
Nested Layouts
Horizontal LinearLayout
Slide 28
Slide 28 text
Nested Layouts
Vertical LinearLayout
Slide 29
Slide 29 text
Nested Layouts
TV
TV
TV
TV
TV
TV
TextViews
Slide 30
Slide 30 text
Nested Layouts
Slide 31
Slide 31 text
Nested Layouts
change height
Slide 32
Slide 32 text
Nested Layouts
Slide 33
Slide 33 text
Nested Layouts
measures
Slide 34
Slide 34 text
Nested Layouts
measures
Slide 35
Slide 35 text
Nested Layouts
measures
Slide 36
Slide 36 text
Nested Layouts
measures
Slide 37
Slide 37 text
Nested Layouts
measures
Slide 38
Slide 38 text
Nested Layouts
measures
Slide 39
Slide 39 text
Nested Layouts
measures
Slide 40
Slide 40 text
Nested Layouts
measures
Slide 41
Slide 41 text
Nested Layouts
measures
Slide 42
Slide 42 text
Nested Layouts
measures
Slide 43
Slide 43 text
Nested Layouts
measures
Slide 44
Slide 44 text
Nested Layouts
measures
Slide 45
Slide 45 text
Nested Layouts
measures
Slide 46
Slide 46 text
Nested Layouts
measures
Slide 47
Slide 47 text
I have concerns
Slide 48
Slide 48 text
Performance
Slide 49
Slide 49 text
Performance
Similar to RelativeLayout on old devices (dalvik…)
Slide 50
Slide 50 text
Performance
Similar to RelativeLayout on old devices (dalvik…)
Currently a bit slower with art, but not meaningful
Slide 51
Slide 51 text
Performance
Similar to RelativeLayout on old devices (dalvik…)
Currently a bit slower with art, but not meaningful
Flattening gains
Slide 52
Slide 52 text
Performance
Similar to RelativeLayout on old devices (dalvik…)
Currently a bit slower with art, but not meaningful
Flattening gains
Measure your app!
Slide 53
Slide 53 text
Performance
Similar to RelativeLayout on old devices (dalvik…)
Currently a bit slower with art, but not meaningful
Flattening gains
Measure your app!
Send us examples :)
Slide 54
Slide 54 text
Size / Memory
Slide 55
Slide 55 text
Size / Memory
Current library ~130Kb
Slide 56
Slide 56 text
Size / Memory
Current library ~130Kb
Low memory usage
Slide 57
Slide 57 text
Measures
Wrap Content
Match Constraints
Slide 58
Slide 58 text
Going forward
Slide 59
Slide 59 text
Going forward
10 releases since Google IO
Slide 60
Slide 60 text
Going forward
10 releases since Google IO
Default in Android Studio 2.3
Slide 61
Slide 61 text
Going forward
10 releases since Google IO
Default in Android Studio 2.3
Open Source
Slide 62
Slide 62 text
Going forward
10 releases since Google IO
Default in Android Studio 2.3
Open Source
Support Existing Layouts
Slide 63
Slide 63 text
Going forward
10 releases since Google IO
Default in Android Studio 2.3
Open Source
Support Existing Layouts
XML vs Visual Editor
Slide 64
Slide 64 text
Going forward
10 releases since Google IO
Default in Android Studio 2.3
Open Source
Support Existing Layouts
XML vs Visual Editor