Thread
#compose
    Florian

    Florian

    1 year ago
    Does
    LazyColumn
    not yet keep scroll position after config changes or is my setup just wrong?
    Alexander Black

    Alexander Black

    1 year ago
    you might need to do something like this:
    Use rememberSaveable to restore your UI state after an activity or process is recreated. rememberSaveable retains state across recompositions. In addition, rememberSaveable also retains state across activity and process recreation.
    Colton Idle

    Colton Idle

    1 year ago
    Also, rememberSaveable wasn't working correctly because of some androidx library alpha05. Try alpha06 which was released yesterday.
    Florian

    Florian

    1 year ago
    I'm already using
    rememberLazyListState
    which uses
    rememberSaveable
    internally. Still, the scroll position is lost after a rotation
    a

    Abhishek Dewan

    1 year ago
    I’ve used scaffold with lazy column and then used rememberScaffoldState and that works pretty well to save scroll state https://github.com/abhishekdewan101/Scout/blob/782c088bbd79eab3581560020a9d4b3ccdf7f068/app/src/main/java/com/abhishek101/gamescout/features/main/discover/DiscoverTab.kt#L72
    b

    Berkeli Alashov

    1 year ago
    afaik There is also a bug where it doesn't save scroll position if there are multiple item/items