21
21
<Transition
22
22
motion : constraintSetStart =" @+id/start"
23
23
motion : constraintSetEnd =" @+id/end" >
24
- <!-- TODO add OnSwipe tag -- >
24
+ < OnSwipe motion : touchAnchorId = " @id/red_star " / >
25
25
</Transition >
26
26
27
27
<!-- Constraints to apply at the start of the animation -->
28
28
<ConstraintSet android : id =" @+id/start" >
29
- <!-- TODO apply starting constraints -->
29
+ <Constraint
30
+ android : id =" @+id/red_star"
31
+ android : layout_width =" wrap_content"
32
+ android : layout_height =" wrap_content"
33
+ motion : layout_constraintStart_toStartOf =" parent"
34
+ motion : layout_constraintEnd_toEndOf =" parent"
35
+ motion : layout_constraintBottom_toBottomOf =" parent" />
36
+ <Constraint
37
+ android : id =" @+id/left_star"
38
+ android : layout_width =" wrap_content"
39
+ android : layout_height =" wrap_content"
40
+ android : alpha =" 0.0"
41
+ motion : layout_constraintStart_toStartOf =" parent"
42
+ motion : layout_constraintEnd_toEndOf =" parent"
43
+ motion : layout_constraintBottom_toBottomOf =" parent" />
44
+ <Constraint
45
+ android : id =" @+id/right_star"
46
+ android : layout_width =" wrap_content"
47
+ android : layout_height =" wrap_content"
48
+ android : alpha =" 0.0"
49
+ motion : layout_constraintStart_toStartOf =" parent"
50
+ motion : layout_constraintEnd_toEndOf =" parent"
51
+ motion : layout_constraintBottom_toBottomOf =" parent" />
30
52
</ConstraintSet >
31
53
32
54
<!-- Constraints to apply at the end of the animation -->
33
55
<ConstraintSet android : id =" @+id/end" >
34
- <!-- TODO apply ending constraints -->
56
+ <Constraint
57
+ android : id =" @+id/left_star"
58
+ android : layout_width =" wrap_content"
59
+ android : layout_height =" wrap_content"
60
+ android : alpha =" 1.0"
61
+ motion : layout_constraintHorizontal_chainStyle =" packed"
62
+ motion : layout_constraintStart_toStartOf =" parent"
63
+ motion : layout_constraintEnd_toStartOf =" @id/red_star"
64
+ motion : layout_constraintTop_toBottomOf =" @id/credits" />
65
+ <Constraint
66
+ android : id =" @+id/red_star"
67
+ android : layout_width =" wrap_content"
68
+ android : layout_height =" wrap_content"
69
+ motion : layout_constraintStart_toEndOf =" @id/left_star"
70
+ motion : layout_constraintEnd_toStartOf =" @id/right_star"
71
+ motion : layout_constraintTop_toBottomOf =" @id/credits" />
72
+ <Constraint
73
+ android : id =" @+id/right_star"
74
+ android : layout_width =" wrap_content"
75
+ android : layout_height =" wrap_content"
76
+ android : alpha =" 1.0"
77
+ motion : layout_constraintStart_toEndOf =" @id/red_star"
78
+ motion : layout_constraintEnd_toEndOf =" parent"
79
+ motion : layout_constraintTop_toBottomOf =" @id/credits" />
35
80
</ConstraintSet >
36
81
</MotionScene >
0 commit comments