Fixed
Status Update
Comments
ke...@google.com <ke...@google.com>
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit e40004b9e772b5e4e66a8dcdc3d2e2a1628108ad
Author: José Figueroa Santos <serniebanders@google.com>
Date: Tue Mar 21 14:39:09 2023
[M3][BottomSheetScaffold] Adds Hidden state boolean flag to sheet state.
This enables standardBottomSheet to implement a fully Hidden state should the user choose to.
Additionally adds documentation to SheetState.requireOffset(), and updates BottomSheetDefaults.MinimizedShape -> BottomSheetDefaults.HiddenShape
Bug: 274463511
Bug: 273870234
Test: Tests updated Hidden functionality for BottomSheetScaffold
Test: Preserves existing unit tests where Hidden state does not exist
RelNote: SheetState now has optional skipHiddenState parameter
RelNote: rememberStandardBottomSheetState now has optional skipHiddenState parameter
RelNote: BottomSheetScaffold now has a defined Hidden anchor, though it is disabled by default
RelNote: SheetState.requireOffset documentation has been updated
RelNote: BottomSheetDefaults.MinimizedShape has been renamed as BottomSheetDefaults.HiddenShape
Change-Id: I839f464c556eafb1b6fd823134da46943475919d
M compose/material3/material3/api/public_plus_experimental_1.1.0-beta01.txt
M compose/material3/material3/api/public_plus_experimental_current.txt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/BottomSheetScaffoldTest.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ModalBottomSheetTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/Strings.android.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/BottomSheetScaffold.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/ModalBottomSheet.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SheetDefaults.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Strings.kt
M compose/material3/material3/src/desktopMain/kotlin/androidx/compose/material3/Strings.desktop.kt
https://android-review.googlesource.com/2500395
Branch: androidx-main
commit e40004b9e772b5e4e66a8dcdc3d2e2a1628108ad
Author: José Figueroa Santos <serniebanders@google.com>
Date: Tue Mar 21 14:39:09 2023
[M3][BottomSheetScaffold] Adds Hidden state boolean flag to sheet state.
This enables standardBottomSheet to implement a fully Hidden state should the user choose to.
Additionally adds documentation to SheetState.requireOffset(), and updates BottomSheetDefaults.MinimizedShape -> BottomSheetDefaults.HiddenShape
Bug: 274463511
Bug: 273870234
Test: Tests updated Hidden functionality for BottomSheetScaffold
Test: Preserves existing unit tests where Hidden state does not exist
RelNote: SheetState now has optional skipHiddenState parameter
RelNote: rememberStandardBottomSheetState now has optional skipHiddenState parameter
RelNote: BottomSheetScaffold now has a defined Hidden anchor, though it is disabled by default
RelNote: SheetState.requireOffset documentation has been updated
RelNote: BottomSheetDefaults.MinimizedShape has been renamed as BottomSheetDefaults.HiddenShape
Change-Id: I839f464c556eafb1b6fd823134da46943475919d
M compose/material3/material3/api/public_plus_experimental_1.1.0-beta01.txt
M compose/material3/material3/api/public_plus_experimental_current.txt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/BottomSheetScaffoldTest.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ModalBottomSheetTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/Strings.android.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/BottomSheetScaffold.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/ModalBottomSheet.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SheetDefaults.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Strings.kt
M compose/material3/material3/src/desktopMain/kotlin/androidx/compose/material3/Strings.desktop.kt
ma...@google.com <ma...@google.com> #3
Resolved as of next release. Please note the default behavior for BottomSheetScaffold will still be to not allow Hidden value, but this can be overriden with a new flag for the State object. This is because StandardBottomSheet by design should generally coexist with the UI, in a Partially or fully expanded state.
pr...@google.com <pr...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.1.0-beta02
Description
Jetpack Compose version: BOM 2024.06.00
Material Library Version (M2, M3 or Both?): M3
Material Compose component used: SearchBar
Android Studio Build: 2024.1.1
Kotlin version: 2.0.0
Steps to Reproduce or Code Sample to Reproduce:
SearchBar
astopBar
and aLazyColumn
of items ascontent
into aScaffold
.SearchBar
.SearchBar
pushes content below away instead of overlaying above it, and closing it pulls back the content below.SearchBar
increasing its layout height in-place, which means thecontent
will be given less height during measurement.This can be seen in blog posts about how to usehttps://medium.com/@shivathapaa/custom-topappbar-using-android-jetpack-compose-f9b33388a125 (disclaimer: I'm not the author of it) has a GIF recording which shows this problem if one observe carefully.
SearchBar
as well, e.g.This isn't a problem in Compose Material Catalog SearchBarSamples because the sample is using a
Box
and a fixed top padding for the list. However, that doesn't work in most real world scenarios e.g. when people need to useScaffold
.I think the material-components-android approach for , which is to offer
SearchBar
SearchBar
andSearchView
separately, is more flexible and will make it possible to handle layout (and window insets) correctly under all scenarios.Stack trace (if applicable): N/A