:android-wave:Hello! I’m new to Jetpack Compose an...
# compose
k
👋Hello! I’m new to Jetpack Compose and I’m currently struggling with an issue related to
LazyColumn
. I was hoping someone here might have a tip. Summary: I’d like to create a
LazyColumn
where new items are appended to the bottom of the list. When a new item is added, the entire list should slide-up in unison to accommodate it. I’ve created a basic example with
animateScrollToItem
in a
LaunchedEffect
where the intended experience almost works, with one issue: the slide-up animation only occurs after the list fills up its available real estate. I think this makes sense because there is nothing to scroll to until the list is filled-up. I’m able to remedy the problem by simply prepending a large empty
Box
as the first item of my
LazyColumn
, but this felt a bit odd. Any suggestions are welcome—thank you!
1
t
Maybe you can try
animateContentSize
in the LazyColumn
g
hi @Kevin Eder I am struggling with the same issue, how you solve this? can you share the code herethank you color
k
Hi @Gumiku. I no longer have access to my code since it was for a job I’ve since left. I believe my sample snippet I originally posted +
animateContentSize
is pretty close to what I demoed. Sorry I can’t be of more help.
thank you color 1