theapache64
08/12/2021, 6:59 PMnavigate
) a page (composable
) as transparent?composable
on another composable
when using navigation-compose
library? OR how to create transparent page?Colton Idle
08/12/2021, 7:13 PMShakil Karim
08/12/2021, 8:13 PMtheapache64
08/12/2021, 8:14 PMtheapache64
08/12/2021, 8:16 PMcomposable
on another composable
Example : I’ve two destinations, A
and B
. When navigated from A
to B
i want to see A
through B
provided I’ve a transparent background in B
?
NavHost(navController = navController, startDestination = "A") {
composable("A") {
Box(
modifier = Modifier
.background(Color.Red)
.clickable {
navController.navigate("B")
}
.fillMaxSize()
)
}
composable("B") {
Box(
modifier = Modifier
.background(Color.Blue.copy(alpha = 0.5f)) // I want to see A :'(
.fillMaxSize()
)
}
}
theapache64
08/12/2021, 8:22 PM@android:style/Theme.Translucent
😄theapache64
08/12/2021, 8:22 PMShakil Karim
08/12/2021, 8:23 PMtheapache64
08/12/2021, 8:24 PMcomposable
😄 not normal @Composable
theapache64
08/12/2021, 8:24 PMIan Lake
08/16/2021, 5:46 PMFloatingWindow
destinations (those that don't fully replace the previous destination) are dialog
and bottomSheet
theapache64
08/31/2021, 7:51 AMcomposable
also? something like
NavHost{
composable(route = "B", isTransparent = true){
...
}
}
which would render both B
and the previous entryIan Lake
08/31/2021, 3:41 PMFloatingWindow
destinations live above the previous entry