Are there any known issues with using bottom sheet...
# compose
Are there any known issues with using bottom sheets for dynamic content and/or user (keyboard) input? For example: A bottom sheet containing a search bar and a list of items which is filtered based on the search.
My use case is an app using the camera, so the camera preview sits behind the bottom sheet. I opted for bottom sheets because I don’t want to take the user away from the camera preview, which may be streaming live to an audience. My conclusion currently is that bottom sheets are not ready for production in this case (or perhaps are not meant to be used in this way). I observe these problems: • Opening animation sometimes “overscrolls” the size of the bottom sheet content, which briefly shows a black bar underneath the sheet, after which the bottom sheet snaps back to the bottom of the screen. • Using a search bar (as in the above example), which filters a list, can lead to the sheet detaching from the bottom of the screen, for example if your search terms don’t match any items and there is now no content in your list.
Material guidelines use “support chat” as an example use case for bottom sheets, so it seems they are indeed meant to handle keyboard input.
Some of these issues may simply be bugs, which is why I’m asking. But I also wonder if a bottom sheet (as provided in
) doesn’t fit my use case.
Yep these are known issues. General sentiment is that you're in for a not-always-great time with ModalBottomSheetLayout and dynamic content right now and that the APIs need to be changed up a bit to properly support that. That being said, it's always good to look through the issue tracker and file bugs if your use case isn't there yet!
Thanks for responding Jossi, I'll probably build a workaround for now and wait for API updates