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
Loading
Please register or sign in to comment