I am try to animate a items in `LazyColumn`. If I...
# compose-android
a
I am try to animate a items in
LazyColumn
. If I scroll to the bottom of the list, remove a few items at the bottom and let the LazyColumn animate the changes, the upcoming items that were previous out of bounds does not animate. For example in this attached recording, "Test15" to "Test20", the items were animating in place, but items "Test10" to "Test14" which were previously out of bounds just instantly shown in place. Anyone have any idea how to properly fix the animation in this case? I expected the items "Test10" to "Test14" to also animate down from the top like "Test15" to "Test20". Is there anyway to achieve that or is this a current
LazyColumn
limitation? Thanks in advance
j
Are you giving all items a stable ID?
a
yes.. all items have stable ids.. if the i do the animation where the out of bounds items were coming from the bottom.. the animation works ok.. it is only when the out of bounds items were coming from the top that the issue shows up...
a
Maybe try
Copy code
val cacheWindow = remember {
        LazyLayoutCacheWindow(
            aheadFraction = 1f,
            behindFraction = 1f
        )
    }

    val listState = rememberLazyListState(cacheWindow = cacheWindow)
let us know if it works 🙂
💯 1
a
thanks for the suggestion i will try once i got the time and ill let you know