Bug P2
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 9866e082aee50bfbe8a39f1c438f43b6c6bebe4a
Author: Alexandre Elias <aelias@google.com>
Date: Wed Jan 27 18:26:05 2021
Change ScrollAxisRange SemanticsProperty to take lambdas returning Float
This Modifier.offset() style pattern will unlock performance
improvements in the future.
Bug: 178657186
Test: Existing tests
Relnote: "For performance reasons, ScrollAxisRange semantics now takes
lambdas returning Floats instead of direct Float values."
Change-Id: If4a353ef9ac511ce77cf334ccf9a589ecadcac56
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.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/androidAndroidTest/kotlin/androidx/compose/ui/AndroidComposeViewAccessibilityDelegateCompatTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsProperties.kt
https://android-review.googlesource.com/1562184
Branch: androidx-main
commit 9866e082aee50bfbe8a39f1c438f43b6c6bebe4a
Author: Alexandre Elias <aelias@google.com>
Date: Wed Jan 27 18:26:05 2021
Change ScrollAxisRange SemanticsProperty to take lambdas returning Float
This Modifier.offset() style pattern will unlock performance
improvements in the future.
Bug: 178657186
Test: Existing tests
Relnote: "For performance reasons, ScrollAxisRange semantics now takes
lambdas returning Floats instead of direct Float values."
Change-Id: If4a353ef9ac511ce77cf334ccf9a589ecadcac56
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.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/androidAndroidTest/kotlin/androidx/compose/ui/AndroidComposeViewAccessibilityDelegateCompatTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsProperties.kt
Description
When scrolling, we need to avoid replacing a modifier and causing an extra recompose on every scroll increment. We can adapt the lambda+snapshot invalidation approach used in Modifier.offset for the ScrollAxisRange semantics.