voyager
voyager copied to clipboard
Layout Inspector and Live Edit are not working
Layout Inspector and Live Edit are not working properly. After I enable any of them l see an initial screen that I put into navigator constructor ( BlankScreen
in my case) not the restored screen stack. But somehow it goes back to normal after I enable "Don't keep activities"
It's easier to test with Layout Inspector.
MainActivity looks like this:
class MainActivity : ComponentActivity() {
private val viewModel: MainActivityViewModel by viewModels()
@Inject
lateinit var compositionLocalsProviders: Set<@JvmSuppressWildcards ProvidedValue<*>>
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen().setKeepOnScreenCondition { viewModel.uiState.showSplashScreen }
super.onCreate(savedInstanceState)
setContent {
CompositionLocalProvider(*compositionLocalsProviders.toTypedArray()) {
Navigator(
BlankScreen(),
disposeBehavior = NavigatorDisposeBehavior(disposeNestedNavigators = false),
) { navigator ->
MainContentContainer(navigator) {
CurrentScreen()
}
}
}
}
}
}
And I've checked - by default enabling Layout Inspector does not recreate the activity. So probably it somehow related to the fact that screens stack is also not restored properly.
the same problem with live edit :( this behaviour renders live edit useless. Is any chance to fix it?