Remove the brightness dip in screen transition crossfades
- Fading the outgoing and incoming screens simultaneously makes content present on both (the camera FAB) dip to ~75% opacity mid-transition - Fade only one layer: hold the outgoing destination opaque under the fading-in incoming one, and reveal the destination instantly under the fading-out one on back
This commit is contained in:
1 parent
761db7a69d
commit
71ad849166
1 file changed
+8
-2
@@ -67,8 +67,14 @@ fun OneCameraNavGraph(navController: NavHostController) {
|
|||||||
navController = navController,
|
navController = navController,
|
||||||
startDestination = FoldersRoute,
|
startDestination = FoldersRoute,
|
||||||
enterTransition = { if (transitionsEnabled) fadeIn(tween(250)) else EnterTransition.None },
|
enterTransition = { if (transitionsEnabled) fadeIn(tween(250)) else EnterTransition.None },
|
||||||
exitTransition = { if (transitionsEnabled) fadeOut(tween(250)) else ExitTransition.None },
|
exitTransition = {
|
||||||
popEnterTransition = { if (transitionsEnabled) fadeIn(tween(250)) else EnterTransition.None },
|
if (transitionsEnabled) {
|
||||||
|
ExitTransition.KeepUntilTransitionsFinished
|
||||||
|
} else {
|
||||||
|
ExitTransition.None
|
||||||
|
}
|
||||||
|
},
|
||||||
|
popEnterTransition = { EnterTransition.None },
|
||||||
popExitTransition = { if (transitionsEnabled) fadeOut(tween(250)) else ExitTransition.None },
|
popExitTransition = { if (transitionsEnabled) fadeOut(tween(250)) else ExitTransition.None },
|
||||||
) {
|
) {
|
||||||
composable<FoldersRoute> {
|
composable<FoldersRoute> {
|
||||||
|
|||||||
Reference in new issue
Block a user