Hey folks, I am trying to create a collapsible sec...
# compose
j
Hey folks, I am trying to create a collapsible section in a lazy column that can contain (potentially) hundreds of list items. I'd like this section to be expandable and collapsible with change animations. I've seen Google recommend to use
AnimatedVisibility
for hiding list items, but this has a negative potential side effect when that list of hidden items is very large: when you scroll past the collapsed section, the LazyColumn tries to recompose all the hidden items at once and drops frames or potentially freezes. I've filed the issue here: https://issuetracker.google.com/issues/240599812 but am not sure if anyone has any alternatives? For now we've settled on just removing the items from the lazy list when they are not visible, but that breaks our change animations.