Status Update
Comments
ap...@google.com <ap...@google.com> #2
Hi,
I also see my text cut off when I set maxLines = 2
. Is it the same issue?
Box(
modifier =
Modifier.size(
width = 108dp,
height = 34dp,
),
contentAlignment = Alignment.Center,
) {
BasicText(
text = "text text text",
maxLines = 2,
autoSize = AutoSize.StepBased(minFontSize = 1.sp, maxFontSize = 13.sp, stepSize = 0.2.sp),
)
}
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Jossi Wolf <
Link:
Fix TextAutoSize bug with maxLines = 1
Expand for full commit details
Fix TextAutoSize bug with maxLines = 1
We were overcaching the paragraphIntrinsics in MultiParagraphLayoutCache when mutating the style. For `AutoSizeStepBased` instances with biased windows (more values smaller/bigger than the optimal), this could result in performing layout with outdated intrinsics, and thus an outdated style and font size, without surfacing this in the TextLayoutResult.
Test: New MultiParagraphLayoutCacheTests and manual testing
Relnote: Fixed a bug in BasicText with TextAutoSize and maxLines set to 1.
Fixes: 376834366
Change-Id: Ic0450c763c5d764492995b44ee1fe570246a9689
Files:
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCacheTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCache.kt
Hash: e1b712d78cc60384ed67a56c006148291ba146a6
Date: Tue Jan 07 18:52:26 2025
cl...@google.com <cl...@google.com>
ap...@google.com <ap...@google.com> #4
#2, yeah, that's the same issue.
ap...@google.com <ap...@google.com> #5
Thanks @jo...@google.com for fixing this! Do you know when the fix would be available for g3 apps?
ap...@google.com <ap...@google.com> #6
Moving the internal discussion offline. The bug is fixed and the fix available in snapshot builds. We will comment on this issue when the bug fix is included in a release.
ap...@google.com <ap...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-beta01
androidx.compose.foundation:foundation-android:1.8.0-beta01
androidx.compose.foundation:foundation-jvmstubs:1.8.0-beta01
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-beta01
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 42c913ab535f0d76554e6805aa9995f2fa6222df
Author: Doris Liu <tianliu@google.com>
Date: Wed Feb 03 11:44:37 2021
Move zoomable, Slider, SnackbarHost to suspend animation
Relnote: "ZoomableController.smoothScaleBy and
ZoomableController.stopAnimation are now suspend functions."
Bug: 177457083
Test: Updated and passed
Change-Id: I7f970ebd60086d3fbe4d805ac115de749bbd4240
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ZoomableSample.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ZoomableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Zoomable.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/SnackbarHost.kt
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit 0a55e899914b1398bed87b33303b083b2efcd418
Author: Doris Liu <tianliu@google.com>
Date: Thu Feb 04 16:28:30 2021
Remove AnimationClockObservable and AnimatedFloat
RelNote: "AnimationClockObservable and subclasses have been
removed. AnimatedFloat has been removed."
Note: this CL is based on aosp/1576426 and aosp/1570862, but
the parent pointer isn't pointing to either of those. This is
to prevent the rebasing of this CL from accidentally uploading
patches to the two CLs above, creating unnecessary churns.
Bug: 177457083
Bug: 178448485
Test: removed
Change-Id: Icde5248072620b741bdf4d8cf59291e7b2994e6a
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/public_plus_experimental_current.txt
M compose/animation/animation-core/api/restricted_current.txt
D compose/animation/animation-core/src/androidMain/kotlin/androidx/compose/animation/core/AndroidAnimationClock.kt
D compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/AnimatedValue.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Animation.kt
D compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/AnimationClock.kt
D compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/AnimationClockObservable.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/DynamicTargetAnimation.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/ManualFrameClock.kt
D compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/MonotonicFrameAnimationClock.kt
D compose/animation/animation-core/src/test/java/androidx/compose/animation/core/AnimationClockTest.kt
M compose/animation/animation-core/src/test/java/androidx/compose/animation/core/AnimationTest.kt
M compose/animation/animation/api/current.txt
M compose/animation/animation/api/public_plus_experimental_current.txt
M compose/animation/animation/api/restricted_current.txt
D compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/AnimatedValueEffects.kt
D compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/DisposableAnimationClock.kt
D compose/animation/animation/src/test/kotlin/androidx/compose/animation/DisposableAnimationClockTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/animation/FlingConfig.kt
M compose/foundation/foundation/src/desktopTest/kotlin/androidx/compose/foundation/gestures/DesktopScrollableTest.kt
D compose/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/AnimationClockBenchmark.kt
M compose/test-utils/src/commonMain/kotlin/androidx/compose/testutils/AnimationClocks.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/MonotonicFrameClockTestRule.kt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/CoroutineBuilders.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidCompositionLocals.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwners.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/Wrapper.kt
ti...@google.com <ti...@google.com> #10
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit 1b90334880260ad5c1f0fde255fd1b6715221844
Author: Doris Liu <tianliu@google.com>
Date: Mon Feb 08 17:59:28 2021
Remove TargetAnimation API
TargetAnimation was used as a part of the AnimatedFloat/Value
API. Now that all usages have been migrated onto the new
suspend animation API. No need to keep this around any more.
Also removes unused @ExperimentalAnimationApi import in material.
RelNote: TargetAnimation API has been removed.
Bug: 177457083
Test: all tests pass
Change-Id: If47d1f88096955c131af20c1660a5c450d5b7ed9
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/public_plus_experimental_current.txt
M compose/animation/animation-core/api/restricted_current.txt
A compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/AnimationEndReason.kt
D compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/DynamicTargetAnimation.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BottomSheetScaffold.kt
Description
The work involved is:
AnimatedFoo
usage from public APIAnimatedFoo
to the new Animatable, and add that to the API doc.AnimatedFoo
@Deprecate, and suppress deprecation in places where it's used as impl detail before all usages are migrated to new suspend APIs.AnimatedFoo
from animation lib (this may happen later)