Fixed
Status Update
Comments
jo...@jossiwolf.de <jo...@jossiwolf.de> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes: b/307694651
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
https://android-review.googlesource.com/3046833
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes:
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
ma...@google.com <ma...@google.com> #3
From offline chat with Jossi:
Calling show from an effect with a sheet that fills the max height will result in the sheet being fully expanded Waiting for one frame - no difference Two frames - the show call gets cancelled Three frames - the sheet expands to the HALF_EXPANDED state as it's supposed to
nj...@google.com <nj...@google.com>
jo...@google.com <jo...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 082d1fb072944f1cb65e0bb4249e17804d670df0
Author: Jossi Wolf <jossiwolf@google.com>
Date: Fri Dec 02 13:13:07 2022
Remove ModalBottomSheetLayout expanded anchor when sheet empty
When the sheet is empty, we will now only have a Hidden anchor. This enables passing in empty sheet content if desired by the user.
Relnote: Fixed an issue where ModalBottomSheetLayout would crash if the sheet content was empty. ModalBottomSheetLayout now allows empty sheet content. If the sheet content is empty, it will only have a Hidden state.
Test: modalBottomSheet_anchorsChange_retainsCurrentValue, modalBottomSheet_emptySheet_expandDoesNotAnimate
Bug: b/200980998 , b/216693030
Change-Id: Ic2288017e3c5a80a0951cf136064cca5e2fab7cb
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ModalBottomSheetTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
https://android-review.googlesource.com/2327674
Branch: androidx-main
commit 082d1fb072944f1cb65e0bb4249e17804d670df0
Author: Jossi Wolf <jossiwolf@google.com>
Date: Fri Dec 02 13:13:07 2022
Remove ModalBottomSheetLayout expanded anchor when sheet empty
When the sheet is empty, we will now only have a Hidden anchor. This enables passing in empty sheet content if desired by the user.
Relnote: Fixed an issue where ModalBottomSheetLayout would crash if the sheet content was empty. ModalBottomSheetLayout now allows empty sheet content. If the sheet content is empty, it will only have a Hidden state.
Test: modalBottomSheet_anchorsChange_retainsCurrentValue, modalBottomSheet_emptySheet_expandDoesNotAnimate
Bug:
Change-Id: Ic2288017e3c5a80a0951cf136064cca5e2fab7cb
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ModalBottomSheetTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
jo...@google.com <jo...@google.com>
na...@google.com <na...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.4.0-alpha04
Description
Hia!
When changing a
ModalBottomSheetLayout
'ssheetContent
and then callingModalBottomSheetState#show
directly after (from an effect), the sheet will expand to theEXPANDED
state. It looks like the anchors aren't calculated correctly. You can repro it with this code:The sheet should go to the
HALF_EXPANDED
state instead. I attached a video of the behavior.Is there any workaround that you can think of?