File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
app/src/main/java/to/bitkit/ui Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ import to.bitkit.ui.sheets.PinSheet
139139import to.bitkit.ui.sheets.SendSheet
140140import to.bitkit.ui.theme.TRANSITION_SHEET_MS
141141import to.bitkit.ui.utils.AutoReadClipboardHandler
142+ import to.bitkit.ui.utils.Transitions
142143import to.bitkit.ui.utils.composableWithDefaultTransitions
143144import to.bitkit.utils.Logger
144145import to.bitkit.viewmodels.ActivityListViewModel
@@ -954,7 +955,9 @@ private fun NavGraphBuilder.qrScanner(
954955 appViewModel : AppViewModel ,
955956 navController : NavHostController ,
956957) {
957- composable<Routes .QrScanner >(
958+ composableWithDefaultTransitions<Routes .QrScanner >(
959+ enterTransition = { Transitions .slideInVertically },
960+ popExitTransition = { Transitions .slideOutVertically },
958961 ) {
959962 QrScanningScreen (navController = navController) { qrCode ->
960963 appViewModel.onScanResult(
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ import androidx.compose.animation.fadeOut
1010import androidx.compose.animation.scaleIn
1111import androidx.compose.animation.scaleOut
1212import androidx.compose.animation.slideInHorizontally
13+ import androidx.compose.animation.slideInVertically
1314import androidx.compose.animation.slideOutHorizontally
15+ import androidx.compose.animation.slideOutVertically
1416import androidx.compose.runtime.Composable
1517import androidx.navigation.NavBackStackEntry
1618import androidx.navigation.NavDeepLink
@@ -27,6 +29,8 @@ object Transitions {
2729 val slideOutHorizontally = slideOutHorizontally(animationSpec = tween(), targetOffsetX = { it })
2830 val scaleIn = scaleIn(animationSpec = tween(), initialScale = 0.95f ) + fadeIn()
2931 val scaleOut = scaleOut(animationSpec = tween(), targetScale = 0.95f ) + fadeOut()
32+ val slideInVertically = slideInVertically(animationSpec = tween(), initialOffsetY = { it })
33+ val slideOutVertically = slideOutVertically(animationSpec = tween(), targetOffsetY = { it })
3034}
3135
3236/* *
You can’t perform that action at this time.
0 commit comments