Fix key frames in headers animation

When setting values for `sizePercent` (or `percentX/Y`) in a KeyPosition,
the value is the relative growth from 0 (beginning of animation) to 1
(end of animation).

Therefore, in order to not have apparent size change
(and movement) before and after the fade in the expansion, we need to
set it to 0 for the `KeyPosition` before 0.5 and 1 for the one after.

Test: manual, date and icons don't move horizontally on expansion
Fixes: 243260726
Change-Id: I30fcb6f4f0a8f9cae98aba22c0400f9c5a8513f1
This commit is contained in:
Fabian Kozynski
2022-08-25 14:36:17 -04:00
parent cbe2a51d60
commit 33d3c26661

View File

@@ -29,17 +29,15 @@
app:percentX="0"
app:percentY="0"
app:framePosition="49"
app:percentWidth="1"
app:percentHeight="1"
app:sizePercent="0"
app:curveFit="linear"
app:motionTarget="@id/date" />
<KeyPosition
app:keyPositionType="deltaRelative"
app:percentX="1"
app:percentY="0.51"
app:sizePercent="1"
app:framePosition="51"
app:percentWidth="1"
app:percentHeight="1"
app:curveFit="linear"
app:motionTarget="@id/date" />
<KeyAttribute
@@ -64,6 +62,7 @@
app:percentX="0"
app:percentY="0"
app:framePosition="50"
app:sizePercent="0"
app:curveFit="linear"
app:motionTarget="@id/statusIcons" />
<KeyPosition
@@ -71,6 +70,7 @@
app:percentX="1"
app:percentY="0.51"
app:framePosition="51"
app:sizePercent="1"
app:curveFit="linear"
app:motionTarget="@id/statusIcons" />
<KeyAttribute