Is it possible to achieve these swipe animations i...
# compose
f
Is it possible to achieve these swipe animations in compose? When user swipes left the content on the screen goes left and another screen comes from the right. When user swipes right the content on the screen goes right and another screen comes from the left. When user swipes down another screen comes from the top. Some contents on the screen also need to animate size/visibility. I haven't found anything that would quite suite my needs. I've tried MotionLayout and DraggableAnchors and had some success but was wondering if there was a better way.
t
I am using a combination of anchoredDraggable and pointerInput to get current position of the touch.
Copy code
.anchoredDraggable(state, Orientation.Horizontal)
.pointerInput(Unit) {
    awaitPointerEventScope {
        while (true) { // just to be able to get y position of pointer
            yPosition = awaitPointerEvent().changes.last().position.y
        }
    }
}
https://github.com/timo-drick/compose_libraries/blob/main/app/src/main/java/de/drick/compose/sample/ui/transition_effect.kt