I have Row in Column.
On the cliсk on this row I must show list of items.
But this list move down fields witch located after this Row.
How to make this list of items ON the main view, something like drop down menu?
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
Column(
modifier = Modifier
.padding(paddingValues)
.padding(bottom = 20.dp)
.fillMaxWidth(),
horizontalAlignment = Alignment.Start,
verticalArrangement = Arrangement.spacedBy(5.dp)
) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.padding(horizontal = 4.dp)) {
if (list.isNotEmpty() ) {
Column(
modifier = Modifier.fillMaxWidth()
.background(Color.Transparent))
{
list.forEach { item ->
// this surface should be as drop down list, as rows elevated on the main view
Surface(modifier = Modifier.clickable(onClick = onClick),
color = MaterialTheme.colorScheme.background,
shape = MaterialTheme.shapes.medium
) {
Row(verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.padding(horizontal = 16.dp, vertical = 1.dp)
) {
}}
}
}
}
}
}