setContent {
AndroidView(modifier = Modifier) {
SurfaceView(it).apply {
holder.addCallback(this@MainActivity)
}
}
Column {
Button(onClick = {}) {
Text(text = "Button")
}
...
}
}
This is basically the setup I have in the onCreate function of the activity. Starting the activity works normal, but as soon as the button is clicked, the Column composable is not visible anymore (whether it is not being drawn or hidden behind the SurfaceView, I have no idea..).
Adding zIndex modifiers to both the AndroidView as well as the Column wasn't helping. Also the problem (or maybe even a bug in Jetpack Compose?) is only observable with a SurfaceView inside the AndroidView, other Views seem to be working.