Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9c0fbb1a authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Make it possible to compute the swipe distance lazily

This CL makes it possible to compute the swipe distance of swipes
lazily, so that the distance can depend on the size or position of
elements from the scene we are transitioning to.

The way it works is pretty simple: UserActionDistance.absoluteDistance
can return 0f until the swipe distance can be computed. This CL also
exposes a UserActionDistanceScope to get the target size and offset of
an element inside a scene, which are usually useful to compute swipe
distances that depend on an element target state.

Note that some of the code in this CL is going to be moved in
ag/26316632.

Bug: 308961608
Test: SwipeToSceneTest
Flag: N/A
Change-Id: If70c48de0aba7a793942badcb5a24993277302b1
parent 7b5f3f42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment