Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 343ef204a6a8c70ffdf17db4cb907604c0184109
Author: Matvei Malkov <malkov@google.com>
Date: Thu May 27 19:23:40 2021
Make scrim disappear when the color of the scrim is Color.Unspecified
Previously we reacted to the Color.Transparent, which is not a very clear contract to have.
Fixes: 182063309
Test: added new
Relnote: Scrim in BottomDrawer, BackdropScaffold and ModalBottomSheetLayout will disappear then the Color.Unspecified is passed
Change-Id: I2d8999e16e2b4b3942e4fd9df424c5d6446e5a2b
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/BackdropScaffoldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ModalBottomSheetTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BackdropScaffold.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
https://android-review.googlesource.com/1720993
Branch: androidx-main
commit 343ef204a6a8c70ffdf17db4cb907604c0184109
Author: Matvei Malkov <malkov@google.com>
Date: Thu May 27 19:23:40 2021
Make scrim disappear when the color of the scrim is Color.Unspecified
Previously we reacted to the Color.Transparent, which is not a very clear contract to have.
Fixes: 182063309
Test: added new
Relnote: Scrim in BottomDrawer, BackdropScaffold and ModalBottomSheetLayout will disappear then the Color.Unspecified is passed
Change-Id: I2d8999e16e2b4b3942e4fd9df424c5d6446e5a2b
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/BackdropScaffoldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ModalBottomSheetTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BackdropScaffold.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
ma...@google.com <ma...@google.com> #3
Thanks Alex! As a heads-up, we're changed the logic so any transparent color will still make scrim appear and block, the only way to remove the scrim will be the Color.Unspecified
, similar to any other api (e.g. Icon's tint.)
Description
The problem occurs in this line:https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt;l=309;drc=bac224c07d3f114ef8c38b840536a8e45f17317b
I think this code should probably be checking if the alpha is 0f instead of if the color is
0x00000000
. That way you can cover all transparent hex colors, not just transparent black.