Status Update
Comments
sg...@google.com <sg...@google.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.
di...@gmail.com <di...@gmail.com> #5
mo...@gmail.com <mo...@gmail.com> #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).
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
Author: Shalom Gibly <
Link:
Prevent a crash when Float.NaN is a progress value
Expand for full commit details
Prevent a crash when Float.NaN is a progress value
- Check for a NaN value and return zero if a progress lambda is
producing it and passing it into a `ProgressBarRangeInfo`. The range
info will throw an exception if a NaN is passed in.
- Applied the check at the progress indicators (M3 & M2), and at the
loading indicator.
- The remaining implementation does not cras on NaN, but the UI usually
does not render anything.
- Also, switched to use `fastCoerceIn` instead of `coerceIn`.
Test: Added
Fixes: 352364576
Relnote: "Fixed a crash at the progress and loading indicators in case a
Float.NaN is passed in as a progress."
Change-Id: I4fa969a1d46358a6f1db8b28cb0a375a809102c2
Files:
- M
compose/material/material/src/commonMain/kotlin/androidx/compose/material/ProgressIndicator.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/LoadingIndicatorTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ProgressIndicatorTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/WavyProgressIndicatorTest.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/LoadingIndicator.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/ProgressIndicator.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/WavyProgressIndicator.kt
Hash: bf90726d0c7fadd916c5c8bf38b18f6a9a5d7a6b
Date: Wed Jan 22 16:28:41 2025
ar...@gmail.com <ar...@gmail.com> #8
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.material3:material3:1.4.0-alpha08
androidx.compose.material3:material3-android:1.4.0-alpha08
androidx.compose.material3:material3-jvmstubs:1.4.0-alpha08
androidx.compose.material3:material3-linuxx64stubs:1.4.0-alpha08
Description
Jetpack Compose version: androidx.compose:compose-bom:2024.06.00
Material Library Version (M2, M3 or Both?): M3
Material Compose component used: androidx.compose.material3:material3
Android Studio Build: 2024.1.1
Kotlin version: 1.9.24
Passing NaN to LinearProgressIndicator will cause the following crash; seems that coercedProgress() does not handle NaNs.