I have a LazyColumn with a HorizontalPager as its ...
# compose
z
I have a LazyColumn with a HorizontalPager as its first item. Whenever the page changes, the rest of the list changes and Id like to animate this change, but I cant think of a good way to approach it. I dont want the items to animate as the user scrolls; it should just happen in reaction to page change events. Any ideas on how I can best implement something like this?
Ive thought about placing the pager outside of the list, and shrinking it in size as the user scrolls to fake it being a part of the list. In theory this would work, but I have two fears: 1. This would make the layout a lot more complicated. The list increases in size as the user scrolls which doesnt seem like a good idea. I can use offsetY for this, but that doesnt seem like a much better idea. 2. I have other animations running in response to scroll events, e.g. topAppBar fades out, stickyHeaders grow in size. These work, but are "frail" until some bugs in compose have been resolved. Until then, Im afraid that these animations will break with the introduction of something like this.