I'm building some screens in Jetpack Compose with the use of androidx.navigation.compose.NavHost
and without fragments (the new way). I want to navigate from one screen to another while keeping an element of the screen fixed.
For example this is the first screen, by pressing the blue button it goes to the second screen, and here I want the black element to remain fixed (without dissolving and reappearing on the next screen):
This is the second screen:
I know that the navigation component just changes screens, so maybe the solution would be to have two screens on the window at the same time, one of which remains fixed while the other transits. How do I achieve that?
I also tried with com.google.accompanist.navigation.animation.AnimatedNavHost
but it doesn't seem to have that option available.