-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sliding transition #250
Comments
You can use |
The |
PreCompose does not expose the BaskStackEntry in NavTransition, so currently is limited to only the one way transition, maybe I can expose the BaskStackEntry in NavTransition so you can make your own transition according to the BackStackEntry. |
Something like this replicates the navTransition = NavTransition(slideInHorizontally(initialOffsetX = {
val currentTabIndex = tabs.indexOfFirst { it.route == currentRoute }
val nextTabIndex = currentTabIndex + 1 // TODO: find real next tab index using BaskStackEntry
if (currentTabIndex < nextTabIndex) {
1000
} else {
-1000
}
})), One thing the How do people actually implement this properly? I would think this is a common use-case. |
Well seems like current material guidelines does not like this behavior: https://m3.material.io/components/navigation-bar/guidelines#f2fb63e1-cc22-4853-acf6-b345e340fc47 , and I usually use |
Ah I see. Well it's not exactly a requirement in for the app I'm working on anyways, I was just curious how one would implement such a feature.
It would be nice if this were possible. |
This action is inconsistent with UX |
What do you mean? |
Is it possible to create a sliding transition between scenes? For example, when I have a bottom navigation bar and click from the item on the left to the right I would like a 'sliding in' transition from the right to the left and vice versa in the other direction. See this image as an illustration:
(Imagine the white part on top is an interesting screen filled with content and the part in purple is the bottom navigation bar)
The text was updated successfully, but these errors were encountered: