Skip to content
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

feat(Android): animate new page sliding up #605

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.mbta.tid.mbta_app.android.pages

import androidx.compose.animation.AnimatedContentTransitionScope
import androidx.compose.animation.core.EaseInOut
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
Expand Down Expand Up @@ -144,7 +147,13 @@ fun NearbyTransitPage(
modifier =
Modifier.height(sheetHeight)
.padding(outerSheetPadding)
.background(MaterialTheme.colorScheme.surface)
.background(MaterialTheme.colorScheme.surface),
enterTransition = {
slideIntoContainer(
AnimatedContentTransitionScope.SlideDirection.Up,
animationSpec = tween(easing = EaseInOut)
)
}
) {
composable<SheetRoutes.StopDetails> { backStackEntry ->
val navRoute: SheetRoutes.StopDetails = backStackEntry.toRoute()
Expand Down
Loading