nglauber
09/23/2021, 3:56 PMLazyColumn
with multiple `item`/`ìtems`. When I navigate to a “detail” screen, and then go back, the scroll position is lost.
Is this the right bug to follow? https://issuetracker.google.com/issues/179397301Andrey Kulikov
09/23/2021, 3:58 PMnglauber
09/23/2021, 4:27 PMnglauber
09/23/2021, 4:27 PMstateFlow.collectAsState()
nglauber
09/23/2021, 4:33 PMval myState by viewModel.myStateFlow.collectAsState(null)
LazyColumn {
item(ID_H1) { Header1() }
items(
myState.list1,
key = { it.id }
) { ItemType1(it) }
item(ID_H2) { Header2() }
items(
myState.list2,
key = { it.id }
) { ItemType2(it) }
item(ID_H3) { Header3() }
items(
myState.list3,
key = { it.id }
) { ItemType3(it) }
}
as you can see, I’m also assigning the id for all the item/itemsAndrey Kulikov
09/23/2021, 5:55 PMnglauber
09/23/2021, 5:56 PMnglauber
09/23/2021, 5:57 PMAndrey Kulikov
09/23/2021, 6:00 PM