CrossfadeSample
@Sampled
@Composable
fun CrossfadeSample() {
Crossfade(targetState = "A") { screen ->
when (screen) {
"A" -> Text("Page A")
"B" -> Text("Page B")
}
}
}Crossfade allows to switch between two layouts with a crossfade animation.
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Robomori
Run Android emulators and devices outside Android Studio.
@Sampled
@Composable
fun CrossfadeSample() {
Crossfade(targetState = "A") { screen ->
when (screen) {
"A" -> Text("Page A")
"B" -> Text("Page B")
}
}
}Content updated: