Status Update
Comments
ad...@google.com <ad...@google.com>
se...@google.com <se...@google.com> #2
We could add an API to make the weighted distance customizable, aosp/3271691 has more info.
ve...@gmail.com <ve...@gmail.com> #3
I'm attaching the required design for a full state of sheet scaffold. The current version of scaffold will extend under the translucent status bar. Which can be not desired for an arbitrary design, but also it will look weird with the grabber, because grabber will be overlapped by status bar
se...@google.com <se...@google.com> #4
Do you have an example of the code where you are seeing this placement. In your screenshot and in our examples, the sheet stops at the top of the provided content, and not extending beyond the status bar. Additional context of device and API would be helpful as well.
ve...@gmail.com <ve...@gmail.com> #5
Screenshot that I provided, it is desired design, which cannot be implemented with current version of BottomSheetScaffold. For ModalBottomSheet it's possible, because it has parameter windowInsets: androidx.compose.foundation.layout.WindowInsets. But for BottomSheetScaffold the background and sheet itself are both drawn from the top of the scaffold (I can see from sources). Ideally there should optional inset which helps to shift the drawing of the sheet relative to drawing of background in Full state (at least on window inset height or generally on an arbitrary distance).
Description
Jetpack Compose version: 2023.10.01 Jetpack Compose component used: androidx.compose.material3.BottomSheetScaffold Android Studio Build: Android Studio Hedgehog | 2023.1.1 Kotlin version: 1.9.21
The BottomSheetScaffold consists of two parts: the content part (background) and the sheet content part. They are always aligned in terms of placement from the top.
However, this alignment can pose an issue when the background covers the entire screen, including the area under the status bar, but the sheet should not extend under the status bar.
Ideally, the Material Bottom Sheet should offer a parameter to adjust the top margin of the sheet when it is in the FULL state. At the very least, there should be a way to adjust the status bar inset specifically for the sheet itself, without affecting the background.