have anyone done navigation transition in compose?
# compose
c
have anyone done navigation transition in compose?
p
I have a temporary solution, sth like this:
Copy code
composable("screen") {
   EnterTransition { Screen() }
}

// ...

@Composable
private fun EnterTransition(
    content: @Composable () -> Unit,
) {
    if (/* check if is not on back stack */) {
        AnimatedVisibility(
            visible = true,
            enter = slideInHorizontally(initialOffsetX = { it }),
            exit = slideOutHorizontally(targetOffsetX = { -it }),
            content = content,
            initiallyVisible = false
        )
    } else {
        content()
    }
}
c
@pawegio thank you, btw is it possible to make destination screen slide left while push previous screen slide left as well
i
Sliding to the side would be one of the supported types of transitions that Navigation will support in the future (I think it was brought up in our previous request for transition examples: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1619464233360000)
https://issuetracker.google.com/issues/172112072 is the tracking bug if you want to star it 🙂