SOLVED: Used DockedSearchBar Can any one help me o...
# multiplatform
a
SOLVED: Used DockedSearchBar Can any one help me out with keyboard and layout issues. Problem: i have LazyList of items acting as DropDown on an TextField(Suggestions) the problem is the when ever keyboard shows up the list gets hidden behind the keyboard. Goal: I want the LazyList not to be hidden behind the keyboard either by making the entire view go up or any other way.
Copy code
Column(modifier = Modifier.fillMaxWidth()) {
            Row(modifier = Modifier.fillMaxWidth()) {
                TextField(
                    placeholder = placeholder,
                    label = label,
                    modifier = Modifier
                        .fillMaxWidth()
                        .onGloballyPositioned { coordinates ->
                            textFieldSize = coordinates.size.toSize()
                        },
                    value = category,
                    onValueChange = {
                        category = it
                        expanded = true
                        onValueChange(it)
                    },
                    isError = false,
                    supportingText = null,
                    trailingIcon = {
                        IconButton(onClick = { expanded = !expanded }) {
                            Icon(
                                modifier = Modifier.size(24.dp),
                                imageVector = Icons.Rounded.KeyboardArrowDown,
                                contentDescription = "arrow",
                                tint = Color.Green
                            )
                        }
                    }
                )
            }

            AnimatedVisibility(visible = expanded) {
                Card(
                    modifier = Modifier
                        .padding(horizontal = 5.dp)
                        .width(textFieldSize.width.dp),
                    elevation = 15.dp,
                    shape = RoundedCornerShape(10.dp)
                ) {

                    LazyColumn(
                        modifier = Modifier.heightIn(max = 150.dp),
                    ) {
                            items(
                                monitoredSpaces.count()
                            ) {
                                Items(title = monitoredSpaces[it].name) { title ->
                                    category = title
                                    expanded = false
                                }
                            }
                    }

                }
            }

        }

    }
s
Does
Modifier.imePadding()
help?
y
use an exposed drop down
a
none works i.e what i want is way way to provide root view some padding on the bottom when ever keyboard showup this my textField and lazylist(DropDown) would show some the items atleast in list below the textfield