Does anyone know how to work with the composable Stack layout? I understand, that it has to work similar to the RelativeLayout we all know. However, I am not getting the result I need. Instead of one view being drawn over the other, the first one completely covers the second (or the second does not get drawn at all). I am trying to place a Text in the center of the Toolbar and a Button aligning the right side of the screen.
TopAppBar(
title = {
Stack(modifier = Modifier.None) {
Align(alignment = Alignment.Center) {
Text(
text = "MyApp",
style = (+themeTextStyle { h6 }).withOpacity(0.7f)
)
}
Align(alignment = Alignment.CenterRight) {
CircleImageButton(
resource = Res.drawable.ic_action_reload,
onCLick = onRefreshClick
)
}
}
},
color = Color.White
)