https://kotlinlang.org logo
#compose
Title
# compose
v

Venthorus

04/12/2022, 6:05 PM
I have a problem with content size changes in a ModalBottomSheetLayout. If it is in expanded state (without filling the whole screen) and I add content to the sheet content, it seems to animate without me having animateContentSize() or AnimatedContent() anywhere. That's fine I guess, however the anchor of the animation isn't at the bottom. When adding the content, it pushes everything below it down instantly and then "fixes" it by animating everything up. When removing the content, it pushes everything below it up instantly and then animates down everything. It looks especially bad when removing content because you can briefly see an area without the sheet background below the sheet content. I also cannot seem to get around it by adding slideInVertically and slideOutVertically animations to the content that changes. Am I missing something or is it an issue with ModalBottomSheetLayout?
m

Maciej Czekański

04/12/2022, 8:34 PM
I'm having a similar issue, but I haven't spent too much time on finding the solution yet
d

Doris Liu

04/13/2022, 12:20 AM
Could you file a bug please, including a code snippet if available?
v

Venthorus

04/13/2022, 11:39 AM
There already seems to be a post for this issue: https://issuetracker.google.com/issues/201628457 I added more information and a simple code snippet.
👍 1
3 Views