-
Notifications
You must be signed in to change notification settings - Fork 1
/
animation7_collapsing_header_desc.xml
46 lines (40 loc) · 1.62 KB
/
animation7_collapsing_header_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
<?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/expanded" />
<ConstraintSet android:id="@+id/collapsed">
<Constraint android:id="@id/headerImageView">
<Layout
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toBottomOf="@+id/headerView"
app:layout_constraintStart_toStartOf="@id/headerView"
app:layout_constraintTop_toTopOf="@id/headerView" />
</Constraint>
</ConstraintSet>
<Transition
app:constraintSetEnd="@id/collapsed"
app:constraintSetStart="@id/expanded">
<KeyFrameSet>
<KeyAttribute
app:framePosition="0"
app:motionTarget="@id/headerView">
<CustomAttribute
app:attributeName="backgroundColor"
app:customColorValue="#ffffff" />
</KeyAttribute>
<KeyAttribute
app:framePosition="100"
app:motionTarget="@id/headerView">
<CustomAttribute
app:attributeName="backgroundColor"
app:customColorValue="@color/primaryColor" />
</KeyAttribute>
</KeyFrameSet>
<OnSwipe
app:dragDirection="dragUp"
app:touchAnchorId="@id/personRecyclerView"
app:touchAnchorSide="top" />
</Transition>
</MotionScene>