0

enter image description hereI have a bottom sheet used for search, and it has two UI states. Both states share the same LazyColumn.

State 1:

LazyColumn {
    item { Row { ... } }   // search categories
    item { Text(text = "Empty history") }
}

State 2:

LazyColumn {
    item { Text(text = "Results") }
    items(results) { result ->
        ResultCard(result)
    }
}

The problem is that in State 1 I need the "Empty history" text to stay visible between the first 'item { Row() }' and the keyboard, without adding extra scrolling behavior.

Using 'Modifier.fillParentMaxHeight(weight).imePadding()' on the 'Text()' introduces unwanted extra scroll, which I’d like to avoid.

Switching from LazyColumn to Column for State 1 is not an option because I want to keep both states structurally consistent.That causes a lot of other problems in the app.

The layout needs to remain adaptive, because on smaller devices the keyboard almost covers the "Empty history" text even when the content is aligned to the top.

How can I keep using a LazyColumn while ensuring that "Empty history" stays visible above the keyboard without introducing additional scroll distance?

1
  • I don't think there's a way without scroll. Could you add additional images of what you're trying to achieve? Have you tried using bringIntoViewRequester ? Commented Nov 18 at 1:56

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.