Status Update
Comments
ma...@google.com <ma...@google.com>
jo...@google.com <jo...@google.com> #3
Thanks for the report!
ro...@veeva.com <ro...@veeva.com> #4
The release notes documentation has been edited to clarify this change in behavior for line height.
To support non-standard text sizes, we encourage users to follow the Material design system and use a different style = LocalTextStyle.current.copy(lineHeight = TextUnit.Unspecified)
, or create a custom Typography
entirely.
jo...@google.com <jo...@google.com> #5
[Deleted User] <[Deleted User]> #6
In my case, I have multiple font sizes in the same Text
(using SpanStyle
in AnnotatedString
). There are legitimate reasons for this. For example, when combining Chinese and English (phonetic) together (for language-learning purposes).
jo...@google.com <jo...@google.com> #7
Hi #6, we will update this issue once the change has been merged and when it has been released.
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 762bbc3cea2a9bcfb6fae34e71c6bb8da917f43c
Author: Jossi Wolf <jossiwolf@google.com>
Date: Mon May 15 11:50:25 2023
[M2] Expose AnchoredDraggable components' progress
Fixes: 271169225
Fixes: 276375124
Fixes: 276776071
Fixes: 270066861
Relnote: BottomSheetState, ModalBottomSheetState and BottomDrawerState now expose a progress property indicating the progress between the current (settled) anchor and the closest anchor in the swipe direction.
Test: AnchoredDraggable tests
Change-Id: I1b31727b4f56df890e336bea9f4de526733aaacc
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/AnchoredDraggable.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BottomSheetScaffold.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
pr...@google.com <pr...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.6.0-alpha01
androidx.compose.material:material-android:1.6.0-alpha01
ju...@google.com <ju...@google.com> #10
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.5.0-beta03
androidx.compose.material:material-android:1.5.0-beta03
na...@google.com <na...@google.com> #11
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.wear.compose:compose-material-core:1.2.0-rc01
androidx.wear.compose:compose-ui-tooling:1.2.0-rc01
Description
Jetpack Compose version: 1.4.0-beta02 Jetpack Compose component used: androidx.compose.material.BottomSheetState Android Studio Build: Android Studio Electric Eel | 2022.1.1 Patch 2 Kotlin version: 1.8.10
As per title, after the removal of the
targetValue
isn't possible to know if a bottom sheet is expanding or collapsing.The use case on why this is needed is to change the alpha of an element depending on the current expanded progress of the bottom sheet itself.
The
bottomSheetState.progress
goes always from 0.0 to 1.0, no matter if is expanding or collapsing.And checking the current value doesn't help, because it switches from
Expanded
toCollapsed
remaining with the value of 1.0:Before it was possible to control the alpha of the element with this logic:
But now, without the target value, it is impossible because, once you fully expand or fully collapse the bottom sheet, the
currentValue
will change from Expanded to Collapse, but theprogress
will stay to 1.0.Steps to Reproduce or Code Sample to Reproduce: 1.Add a bottom BottomSheetScaffold with a bottom sheet 2.Try to change the alpha of a component depending on the current expanded/collapsed state, so that the alpha should decrease when the bottom sheet shrink and increase when it expand.