-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Transitions in between Tab Navigator #265
Labels
Comments
I'm able to achieve transitions in between tabs with some source mode modifications.
|
ShivamKumarJha
changed the title
Transitions in between Tabs
Transitions in between Tab Navigator
Nov 29, 2023
This was referenced Feb 6, 2024
I was able to get state-restoration working with a small modification: @Composable
fun ScreenTransition(
navigator: TabNavigator,
transition: AnimatedContentTransitionScope<Tab>.() -> ContentTransform,
modifier: Modifier = Modifier,
- content: TabNavigatorContent = { it.current.Content() }
) {
AnimatedContent(
targetState = navigator.current,
transitionSpec = transition,
modifier = modifier
) { tab ->
navigator.saveableState("transition", tab) {
- content(navigator)
+ tab.Content()
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, Is there any way to have transitions such as slide or fade in between tab navigation?
Thanks
The text was updated successfully, but these errors were encountered: