Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
co...@google.com <co...@google.com>
ap...@google.com <ap...@google.com> #2
Lines for reference in ModalBottomSheet.android.kt
causing this behavior:
val newTarget = when (sheetState.anchoredDraggableState.targetValue) {
Hidden -> Hidden
PartiallyExpanded, Expanded -> {
val hasPartiallyExpandedState = newAnchors
.hasAnchorFor(PartiallyExpanded)
val newTarget = if (hasPartiallyExpandedState) PartiallyExpanded
else if (newAnchors.hasAnchorFor(Expanded)) Expanded else Hidden
newTarget
}
}
na...@google.com <na...@google.com> #3
My proposed solution would be:
val targetValue = sheetState.anchoredDraggableState.targetValue
val newTarget = when (targetValue) {
Hidden -> Hidden
PartiallyExpanded, Expanded -> {
when {
newAnchors.hasAnchorFor(targetValue)) -> targetValue
newAnchors.hasAnchorFor(PartiallyExpanded)) -> PartiallyExpanded
newAnchors.hasAnchorFor(Expanded)) -> Expanded
else -> Hidden
}
}
}
Description
Jetpack Compose version: 2023.10.01 BOM
Jetpack Compose component used: Material 3
Android Studio Build: AI-232.10227.8.2321.11231672 (Iguana | 2023.2.1 Beta 1)
Kotlin version: 1.9.21
Description
The Material 3 spec calls for in the disabled state. I've attached screenshots of the expected and actual outlines.
OutlinedButton
outline doesn't visually match what theSteps to reproduce:
Wrap a disabled
OutlinedButton
inMaterialTheme
andSurface
like so: