Slide 1

Slide 1 text

Deep Dive into Anamika Tripathi @geekanamika

Slide 2

Slide 2 text

About session ● Constraint Layout 1.x ● Motion Editor ● Motion Layout ● Hands on : Motion Layout

Slide 3

Slide 3 text

Anamika Tripathi @geekanamika Android Developer @Zomato

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Before Constraint Layout

Slide 6

Slide 6 text

Before Constraint Layout Building UI is Hard

Slide 7

Slide 7 text

The solution • Nested view hierarchy • Performance issues • Not flexible

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 11

Slide 11 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 12

Slide 12 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 13

Slide 13 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 14

Slide 14 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 15

Slide 15 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 16

Slide 16 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 17

Slide 17 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 18

Slide 18 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 19

Slide 19 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 20

Slide 20 text

Constraint Layout 1.x • Easy positioning view • Guidelines • Barriers • Chains • Bias • Image ratio

Slide 21

Slide 21 text

Motion Layout

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

How animation works?

Slide 25

Slide 25 text

Start End

Slide 26

Slide 26 text

What do we need?

Slide 27

Slide 27 text

What do we need? • Start Position • End position • Transition from start to end • Anything else?

Slide 28

Slide 28 text

What do we need?

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

How to use it?

Slide 32

Slide 32 text

Drawer Layout From Github

Slide 33

Slide 33 text

Drawer Layout From Github

Slide 34

Slide 34 text

Collapsible toolbar Coordinator layout From Github

Slide 35

Slide 35 text

Collapsible toolbar Coordinator layout From Github

Slide 36

Slide 36 text

Drawer Layout From Github

Slide 37

Slide 37 text

Drawer Layout From Github

Slide 38

Slide 38 text

View Pager From Github

Slide 39

Slide 39 text

View Pager From Github

Slide 40

Slide 40 text

Deep Dive into Motion Layout

Slide 41

Slide 41 text

layout/activity_main.xml

Slide 42

Slide 42 text

layout/activity_main.xml

Slide 43

Slide 43 text

Constraint Set

Slide 44

Slide 44 text

Constraint Set

Slide 45

Slide 45 text

Constraint Set

Slide 46

Slide 46 text

Constraint Set

Slide 47

Slide 47 text

Transition

Slide 48

Slide 48 text

Transition

Slide 49

Slide 49 text

Motion Editor

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

Creating icons

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

Motion concepts

Slide 59

Slide 59 text

Motion Concepts • Constraint sets • Transition • onSwipe/onClick • Keyframes • Coordinate system

Slide 60

Slide 60 text

Motion Concepts • Constraint sets • Transition • onSwipe/onClick • Keyframes • Coordinate system

Slide 61

Slide 61 text

Motion Concepts • Constraint sets • Transition • onSwipe/onClick • Keyframes • Coordinate system

Slide 62

Slide 62 text

Motion Concepts • Constraint sets • Transition • onSwipe/onClick • Keyframes • Coordinate system

Slide 63

Slide 63 text

Motion Concepts • Constraint sets • Transition • onSwipe/onClick • Keyframes • Coordinate system

Slide 64

Slide 64 text

KeyFrame

Slide 65

Slide 65 text

Key Frames • Key position • Key attribute • Key Cycle • Key TimeCycle

Slide 66

Slide 66 text

Key Frames • Key position • Key attribute • Key Cycle • Key TimeCycle

Slide 67

Slide 67 text

Key Frames • Key position • Key attribute • Key Cycle • Key TimeCycle

Slide 68

Slide 68 text

Key Position Type

Slide 69

Slide 69 text

Key Position Type

Slide 70

Slide 70 text

Key Position Type

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

Things to explore •Key Cycle •KeyTime cycle •Multi state transition •Key Trigger

Slide 73

Slide 73 text

Learning Resources Introduction to MotionLayout series https://medium.com/google-developers/introduction-to-motionlayout-part- i-29208674b10d Official Docs https://developer.android.com/reference/android/support/constraint/motion/ MotionLayout What’s new in ConstraintLayout https://www.youtube.com/watch?v=29gLA90m6Gk Official Samples on Github https://github.com/googlesamples/android-ConstraintLayoutExamples

Slide 74

Slide 74 text

Questions?