-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanimation3_key_attributes_desc.xml
68 lines (58 loc) · 2.17 KB
/
animation3_key_attributes_desc.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ConstraintSet android:id="@+id/start">
<Constraint android:id="@id/view">
<CustomAttribute
app:attributeName="backgroundColor"
app:customColorValue="#F9A825" />
</Constraint>
<Constraint android:id="@id/textView">
<PropertySet app:alpha="0" />
</Constraint>
</ConstraintSet>
<ConstraintSet android:id="@+id/end">
<Constraint android:id="@id/view">
<CustomAttribute
app:attributeName="backgroundColor"
app:customColorValue="#1565C0" />
<Layout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Transform android:rotation="180" />
</Constraint>
<Constraint android:id="@id/textView">
<PropertySet app:alpha="1" />
</Constraint>
</ConstraintSet>
<Transition
app:constraintSetEnd="@id/end"
app:constraintSetStart="@id/start"
app:duration="400">
<KeyFrameSet>
<KeyAttribute
android:scaleX="2"
android:scaleY="2"
app:framePosition="50"
app:motionTarget="@id/textView" />
<KeyPosition
app:framePosition="30"
app:keyPositionType="pathRelative"
app:motionTarget="@id/view"
app:percentX="0.5"
app:percentY="0.20" />
<KeyPosition
app:framePosition="60"
app:keyPositionType="pathRelative"
app:motionTarget="@id/view"
app:percentX="-0.2" />
</KeyFrameSet>
<OnClick
app:clickAction="toggle"
app:targetId="@id/view" />
</Transition>
</MotionScene>