On a View based screen when I use `ModalBottomSheetLayout` in a `ComposeView` within the XML (child ...
l
On a View based screen when I use
ModalBottomSheetLayout
in a
ComposeView
within the XML (child of a
LinearLayout
) it crashes immediately unless I add it to the root of the View hierarchy with this error:
Copy code
java.lang.IllegalArgumentException: The initial value must have an associated anchor.
Is this expected behaviour?
c
Does your bottom sheet have any content? I seem to recall this exception if your bottom sheet was empty, but I saw it in a pure Compose app
l
Yeah I saw that as well when searching the issue, it's not empty and also has the Box with min size 1dp workaround. This crash also happens when the screen loads and before the sheet is even displayed
j
Do you have an isolated repro?
l
@jossiwolf Yeah here's a minimum repo, issue seems to be when the ComposeView is inside a ScrollView Also raised a bug on the issue tracker https://issuetracker.google.com/issues/258534825
j
Thanks, will take a look!