Status Update
Comments
le...@google.com <le...@google.com> #2
Branch: androidx-main
commit f82ff94526ccacf57ff23c09a7d1bd56c66c646a
Author: Matvei Malkov <malkov@google.com>
Date: Thu Dec 10 16:11:12 2020
Rework tap-based foundation modifiers
Make clickable, toggleable, selectable to be non-@Composable use suspend pointer input under the hood. To be non-composable and still provide good experience with indication means that we need an overload so devs could choice what paramets to worry about.
Change-Id: I0a130bfa57713c96cc8b52c67becd32145526685
Relnote: "clickable, toggleable and selectable can be created outside of composition now"
Fixes: 172938345
Bug: 175294473
Test: added for overload + exisiting
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/MultiDimensionalAnimationDemo.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/SingleValueAnimationDemo.kt
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/IndicationSamples.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/InteractionStateSample.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ZoomableSample.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ClickableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/IndicationTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/SelectableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ToggleableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Clickable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/TapGestureDetector.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/selection/Selectable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/selection/Toggleable.kt
M compose/integration-tests/benchmark/src/androidTest/java/androidx/ui/pointerinput/ComposeTapIntegrationBenchmark.kt
M compose/material/material/integration-tests/material-studies/src/main/java/androidx/compose/material/studies/rally/TopAppBar.kt
to...@gmail.com <to...@gmail.com> #3
Branch: androidx-main
commit a543757a7c94f91f69b345e5c276f689fdde98b6
Author: Matvei Malkov <malkov@google.com>
Date: Thu Dec 10 18:20:49 2020
Move draggable to suspend input
This CL moves draggable to suspend point while adjusting API slightly to simplify the shape.
Relnote: canDrag parameter has been removed from the Modifier.draggable
Bug: 175294473
Test: already exists, it's an implementation detail change
Change-Id: Ic4bec74b6fb3a9306abe4fdee7c6961ad3a62d77
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/src/androidAndroidTest/kotlin/androidx/compose/foundation/DraggableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SliderTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeableTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
le...@google.com <le...@google.com> #4
Branch: androidx-main
commit 0ad5f542128b959357d1eed3fa20791d9adc18f7
Author: Matvei Malkov <malkov@google.com>
Date: Mon Jan 18 17:11:36 2021
Deprecate tap/press based gesture filters.
This CL deprecates tapGestureFilter, dobuleTapGesutreFilter, longPress and indication ones. Migrated all the usages to a new Modifier.pointerInput.
Took a liberty to make a few adjustments in detectTapGestures function, namely: adding Offset param to all the callback + make onTap nullable.
Change-Id: I6baf95f881b6fa6890ca1d065d49fef3e27bce83
Relnote: "tapGestureFilter, doubleTapGestureFilter, longPressGestureFilter and pressIndicaitonGestureFilter have been deprecated. Use Modifier.clickable or Modifier.pointerInput with detectTapGestures function instead."
Bug: 175294473
Test: migrated as well
M compose/androidview/androidview/integration-tests/androidview-demos/src/main/java/androidx/compose/androidview/demos/PointerInputInteropAndroidInCompose.kt
M compose/androidview/androidview/integration-tests/androidview-demos/src/main/java/androidx/compose/androidview/demos/PointerInputInteropComposeInAndroid.kt
M compose/animation/animation-core/samples/src/main/java/androidx/compose/animation/core/samples/TransitionSamples.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/CrossfadeDemo.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/DoubleTapToLikeDemo.kt
M compose/foundation/foundation-layout/samples/src/main/java/androidx/compose/foundation/layout/samples/LayoutOffsetSample.kt
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/ClickableTextSample.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Clickable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/ClickableText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/TapGestureDetector.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldDragGestureFilter.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldGestureModifiers.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/Scrollbar.kt
M compose/integration-tests/benchmark/build.gradle
M compose/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M compose/integration-tests/benchmark/src/androidTest/java/androidx/ui/pointerinput/ComposeTapIntegrationBenchmark.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BackdropScaffold.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
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/gesturescope/SendDoubleClickTest.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/gesturescope/SendLongClickTest.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/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/focus/CustomFocusOrderDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/focus/FocusManagerMoveFocusDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/focus/FocusableDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/focus/ReuseFocusReference.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/DoubleTapGestureDetectorDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/DoubleTapInTapDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/DragScaleGestureDetectorDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/HorizontalScrollersInVerticalScrollerDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/LongPressGestureDetectorDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/NestedLongPressDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/NestedPressDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/NestedScrollingDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/PressIndicatorGestureDetectorDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/TapGestureDetectorDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/VerticalScrollerInDrawerLayoutDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/keyinput/KeyInputDemo.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/LongPressGestureFilterComposeTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/PressIndicatorGestureFilterComposeTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/AndroidPointerInputTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/LayerTouchTransformTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/DoubleTapGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/LongPressDragGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/LongPressGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/PressIndicatorGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/TapGestureFilter.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/window/DesktopPopup.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/DoubleTapGestureFilterTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/TapGestureFilterTest.kt
to...@gmail.com <to...@gmail.com> #5
Branch: androidx-main
commit 6921d92e79c4b7d150130a2fb45d63912983975a
Author: Matvei Malkov <malkov@google.com>
Date: Mon Jan 18 20:17:22 2021
Make Modifier.zoomable use suspend pointer and remove scaleGestureFilters
As zoomable was the only real user of scaleGestureFilter, with it moving to suspend it's time to delete scaleGestureFilter and other filter pieces around it
Change-Id: Id5da14604597ffe92bf1dd32837a34b462eaa80d
Relnote: "Modifier.scaleGestureFilter has been removed. Use Modifier.zoomable instead. Alternatively, use Modifier.pointerInput { detectMultitouchGestures { ... }}"
Bug: 175294473
Test: zoomableTest
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/TransformGestureDetector.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Zoomable.kt
M compose/ui/ui/api/api_lint.ignore
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/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/DragScaleGestureDetectorDemo.kt
D compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/NestedScalingDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/ScaleGestureDetectorDemo.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/RawScaleGestureFilterComposeTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/ScaleGestureFilterTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/ScaleSlopExceededGestureFilterComposeTest.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/RawScaleGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/ScaleGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/ScaleSlopExceededGestureFilter.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/RawScaleGestureFilterTest.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/ScaleSlopExceededGestureFilterTest.kt
M development/build_log_simplifier/messages.ignore
le...@google.com <le...@google.com> #6
Branch: androidx-main
commit 9234901de4b599f334c9bea450afacdafe1600d0
Author: Matvei Malkov <malkov@google.com>
Date: Wed Jan 13 19:02:38 2021
Migrate Scrollable to suspend input.
This is first part of the migration where we migrate to suspend pointer, but not to the suspend animation. Suspend animation migration to come.
Also removed unnecessary canDrag parameter since it's very dated and don't fit in the new design.
Change-Id: Id66e70ac186ffbdd05e2a62af26c7a41e85f02e9
Relnote: canDrag has beem removed from the Modifier.scrollable.
Bug:
Test: ScrollableTest + all the usage side tests (Lazy, ScrollState, etc)
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/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyArrangementsTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyGridTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyListHeadersTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyListsReverseLayoutTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyNestedScrollingTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldScrollTest.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/gestures/AndroidScrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/DragGestureDetector.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListState.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldScroll.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/gestures/DesktopScrollable.kt
M compose/integration-tests/benchmark/src/androidTest/java/androidx/compose/ui/TextFieldToggleTextBenchmark.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/gesturescope/SendSwipeTest.kt
to...@gmail.com <to...@gmail.com> #7
Branch: androidx-main
commit c287d1b0da25548a814ff18496b1101e6a9fbeb8
Author: Matvei Malkov <malkov@google.com>
Date: Tue Jan 26 15:04:34 2021
Deprecate drag-related input filters
This CL deprecated and supressed all the usages of the drag-related gesture filters as well as provides the alternatives for them where applicable
Change-Id: I0ba93559f565fc2a277f322e53dce9df9855ea46
Relnote: "Modifier.dragGestureFilter has been deprecated. Use Modifier.pointerInput { detectDragGestures (...)} instead. Alternatively, use Modifier.draggable for one axis drags"
Bug: 175294473
Test: just a deprecation, tests should pass
M compose/desktop/desktop/src/jvmMain/kotlin/androidx/compose/ui/window/WindowDraggableArea.kt
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/DragGestureDetectorSamples.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/gestures/AndroidScrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/DragGestureDetector.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldGestureModifiers.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionContainer.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionManager.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/Scrollbar.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/gestures/DesktopScrollable.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/text/selection/DesktopSelection.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/text/selection/DesktopSelectionManager.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextSelectionLongPressDragTest.kt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/ColorPickerDemo.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/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/DragSlopExceededGestureFilterDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/HorizontalScrollersInVerticalScrollerDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/LongPressDragGestureDetectorDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/NestedScrollingDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/PopupDragDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/RawDragGestureDetectorDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/ScrollGestureFilterDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/TouchSlopDragGestureDetectorDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/VerticalScrollerInDrawerLayoutDemo.kt
M compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/NestedScrollSamples.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/LongPressDragGestureFilterTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/RawDragGestureFilterComposeTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/RawPressStartGestureFilterComposeTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/ScrollGestureFilterComposeTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/TouchSlopDragGestureFilterTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/DragGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/DragSlopExceededGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/GestureUtils.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/LongPressDragGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/RawDragGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/RawPressStartGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/ScrollGestureFilter.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/RawDragGestureFilterTest.kt
jo...@google.com <jo...@google.com> #8
Branch: androidx-main
commit 79be98f4fe7e15665d8137b923b5732ad894981f
Author: Matvei Malkov <malkov@google.com>
Date: Wed Feb 03 21:36:55 2021
Legacy gesture filters deletion part 1
Where I remove most of the ulitities from the public API and merge files so it's easy to mark them internal later and move to other modules.
Plus this CL removes some of the gesture filters complitely, unblocking future work for removal of the CustomEvents
Bug: 175294473
Change-Id: I2fedf3814840157c278cd91988da3c5ab493c9eb
Relnote: "longPressGestureFilter and doubleClickGestureFilter have been removed. use Modifier.pointerInput with helper functions e.g detectTapGestures"
Relnote: "legacy scroll orientation locking and helper functions have been removed"
Test: some deleted, the rest should pass
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Clickable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/Scrollbar.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/gestures/TapGestureDetectorTest.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/GestureScope.kt
M compose/ui/ui/api/api_lint.ignore
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/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/NestedLongPressDemo.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/ScrollGestureFilterComposeTest.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/Constants.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/Direction.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/DoubleTapGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/DragGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/DragSlopExceededGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/LongPressDragGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/LongPressGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/RawDragGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/RawPressStartGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/ScaleUtil.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/ScrollGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/customevents/DelayUpEvent.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/customevents/LongPressFiredEvent.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/scrollorientationlocking/ScrollOrientationLocker.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/GestureUtilsTest.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/LongPressGestureFilterTest.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/ScaleUtilsTest.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/scrollorientationlocking/ScrollOrientationLockerSetupTest.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/scrollorientationlocking/ScrollOrientationLockerTest.kt
to...@gmail.com <to...@gmail.com> #9
Branch: androidx-main
commit 5aa53ce898e78c0847c0de471be8628d6f81d5c8
Author: Matvei Malkov <malkov@google.com>
Date: Thu Feb 04 22:50:05 2021
Delete CustomEvents from poiner input and a few other APIs
This CL deleted custom events infrastructure as well as other related APIs: scroll orientation locking, pointer input filter initialisation with custom events dispatcher, etc.
Change-Id: I0270780d7b8e6fddaf76f49194713d8eb2b44452
Relnote: CustomEvens support from PointerInputModifier has been removed
Test: pass
Bug: 175294473
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
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/RawDragGestureFilterComposeTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/ScrollGestureFilterComposeTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/HitPathTrackerTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusManager.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/DragGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/GestureUtils.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/LongPressDragGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/PressIndicatorGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/ScrollGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/TapGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/customevents/DelayUpEvent.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/customevents/LongPressFiredEvent.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/scrollorientationlocking/Orientation.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/scrollorientationlocking/ScrollOrientationLocker.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/util/PolyFitLeastSquares.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/util/VelocityTracker.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/HitPathTracker.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/PointerEvent.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/PointerInputTestUtil.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputFilter.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/input/mouse/MouseScrollFilter.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/input/pointer/PointerMoveFilter.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/DragSlopExceededGestureFilterTest.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/PressIndicatorGestureFilterTest.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/RawDragGestureFilterTest.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/RawPressStartGestureFilterTest.kt
D compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/TapGestureFilterTest.kt
le...@google.com <le...@google.com> #10
Branch: androidx-main
commit 7899f7ffd9246f6f35bdbe3a2f9dcd9eaee1e56d
Author: Matvei Malkov <malkov@google.com>
Date: Thu Feb 04 17:08:26 2021
Refine draggable API to allow for suspend motion intergration.
In order to use draggable in swipeable and scrollable, draggable need to provide suspend drag capabilities.
This CL refined draggable API to allow to suspend while processing onDragStart / onDragEnd to launch fling and other processed async, while also introducing dragScope for suspend drag support.
All that makes it possible for scrollable, swipeable and any other drag + animation component to be based on draggable
Change-Id: Ica70f33e73b6691375c9bdf07d008bae7546d48a
Relnote: "Modifier.draggable now accepts DraggableState instead of a simple lambda. you can create state via rememberDraggableState { delta -> } to get the same behaviour as before"
Test: should pass
Bug: 175294473
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/FancyScrollingDemo.kt
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/DraggableSamples.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/InteractionStateSample.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/DraggableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
to...@gmail.com <to...@gmail.com> #11
Branch: androidx-main
commit 9a2619b3be01cd4c49b30517a41e48e96597bee1
Author: Matvei Malkov <malkov@google.com>
Date: Mon Feb 01 19:21:25 2021
Rework Modifier.scrollable to simplify the API and migrate to suspend motion.
Migrated Modifier.scrollable to suspend motion fully, adjusted nested scroll APIs to acommodate this.
This CL also simplifies scrollable API by the removal of ScrollableController and leaving only the interface with default implementation.
Change-Id: I4f5a5189b90cdff631ffb7166ce2e847b92db205
Relnote: "Modifier.scrollable has been reworked. Now it uses Scrollable interface instead of ScrollableController class"
Relnote: "Modifier.nestedScroll APIs has been adjusted to accommodate for suspend animations and fling"
Relnote: "isAnimationRunning and stopAnimation methods on ScrollState and LazyScrollState were removed. Use isScrollInProgress and stopScroll() instead"
Relnote: "ScrollableColumn and ScrollableRow were deleted. Use regular Column and Row with Modifier.verticalScroll() and Modifier.horizontalScroll()"
Fixes: 174485541
Bug: 175294473
Fixes: 178494033
Test: adjusted accordingly, all pass except one @Ignored for now. Also extensively tested in demos
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/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/ListDemos.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/NestedScrollDemos.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ScrollableSamples.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ScrollerSamples.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyNestedScrollingTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldScrollTest.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/gestures/AndroidScrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/animation/FlingConfig.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/animation/Scrolling.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
D compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/ScrollableInterface.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/ScrollableState.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyDsl.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyList.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListState.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldScroll.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/gestures/DesktopScrollable.kt
M compose/foundation/foundation/src/desktopTest/kotlin/androidx/compose/foundation/gestures/DesktopScrollableTest.kt
M compose/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/NestedScrollerBenchmark.kt
M compose/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/ScrollerBenchmark.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeableTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/gesturescope/SendSwipeTest.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/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/HorizontalScrollersInVerticalScrollerDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/NestedScrollingDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/ScrollGestureFilterDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/VerticalScrollerInDrawerLayoutDemo.kt
M compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/NestedScrollSamples.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/nestedscroll/NestedScrollModifierTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/nestedscroll/NestedScrollDelegatingWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/nestedscroll/NestedScrollModifier.kt
le...@google.com <le...@google.com> #12
Branch: androidx-main
commit 3e445ba49456250526a726de4dbdbfd330ba37d5
Author: Matvei Malkov <malkov@google.com>
Date: Thu Feb 04 19:27:05 2021
Migrate Modifier.swipeable and all its users to suspend motion.
Following after draggable rework, it's possible right now to make idiaomatic swipeable modifier with whole suspend motion support.
This CL migrates swipeable and updates the API of all the users accordingly, so now all non suspend callback-y functions are suspending until the animation is done.
Change-Id: I16f608d016fa82a59e3e68b96cb4931dcebb57a6
Relnote: drawerState.open() and drawerState.close() are now suspending functions. Use rememberCoroutineScope() to get the scope of the composition to call them
Relnote: BottomSheet, Backdrop, BottomDrawer APIs that are related to opening, revealing, closing, expanding etc are now suspend
Test: all broken, waiting for Jelle's CL
Bug: 175294473
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
M compose/material/material/api/current.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/BackdropScaffoldSamples.kt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/BottomSheetScaffoldSamples.kt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/ModalBottomSheetSamples.kt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/BackdropScaffoldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/BottomSheetScaffoldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ModalBottomSheetTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeToDismissTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeableTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BackdropScaffold.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
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/SwipeToDismiss.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
to...@gmail.com <to...@gmail.com> #13
Branch: androidx-main
commit 693e3ccfea4b69cf46676bd85dc4d314d8e62282
Author: Matvei Malkov <malkov@google.com>
Date: Fri Feb 05 19:18:12 2021
Delete all unnecessary ui.gesture API expect 4 gesture filters. Also move some API to where it belongs.
I've moved Orientation to foundation since we don't use it in ui anymore, I moved nested scrol land velocity tracker under ui.input and deleted all that is not needed expect for 4 gesture filter files.
Bug: 175294473
Change-Id: Iff4a887648735c4850dca0d8d95fd99d782d04bb
Relnote: Orientation has been moved to foundation package. VelocirtTracker moved from ui.gesture to ui.input.pointer.
Test: tested demos, tests should pass
M compose/animation/animation-core/samples/src/main/java/androidx/compose/animation/core/samples/AnimatableSamples.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/FancyScrollingDemo.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/FlingGame.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/SpringBackScrollingDemo.kt
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/SwipeToDismissDemo.kt
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/DraggableSamples.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/InteractionStateSample.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ScrollableSamples.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/DraggableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyNestedScrollingTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyScrollTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldScrollTest.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/gestures/AndroidScrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Orientation.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyList.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldScroll.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/gestures/DesktopScrollable.kt
M compose/foundation/foundation/src/desktopTest/kotlin/androidx/compose/foundation/ScrollbarTest.kt
M compose/foundation/foundation/src/desktopTest/kotlin/androidx/compose/foundation/gestures/DesktopScrollableTest.kt
M compose/material/material/api/current.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeableTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BackdropScaffold.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
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/SwipeToDismiss.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/util/PointerInputs.kt
M compose/ui/ui/api/api_lint.ignore
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/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/HorizontalScrollersInVerticalScrollerDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/NestedScrollingDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/ScrollGestureFilterDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/gestures/VerticalScrollerInDrawerLayoutDemo.kt
M compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/NestedScrollSamples.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/nestedscroll/NestedScrollModifierTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/DragGestureFilter.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/ScrollGestureFilter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/nestedscroll/NestedScrollDelegatingWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/nestedscroll/NestedScrollModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/VelocityTracker.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/InnerPlaceable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/desktop/ComposeLayer.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/input/mouse/MouseScrollFilter.kt
M compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/input/mouse/MouseScrollFilterTest.kt
M compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/DesktopOwnerTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/gesture/scrollorientationlocking/PolyFitLeastSquaresTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/input/pointer/util/VelocityTrackerTest.kt
to...@gmail.com <to...@gmail.com> #14
Branch: androidx-main
commit 0506aa7959e71a4a898dc3a2251fee6a6b456c0f
Author: Matvei Malkov <malkov@google.com>
Date: Sun Feb 07 17:02:32 2021
Remove last lecagy gesture filter APIs from ui.gesture and delete this package.
Final CL to remove/hide gesture filters API. All usages have been either converted or nailed down to internal copy-pasted version of the same api to remove later.
Change-Id: I266ed741ca484924409a4a3a7d5afbbfffbd66d3
Relnote: Modifier.tapGestureFilter has been removed. Use Modifier.pointerInput { detectTapGestures(...) } instead.
Relnote: Modifier.dragGestureDetector has been removed. Use Modifier.draggable or Modifier.pointerInput { detectDragGestures(...) } instead.
Relnote: Modifier.pressIndicationGestureFilter has been removed. Use Modifier.indication to show just indication or use Modifier.pointerInput { detectTapGestures(onPress = {... }) } instead.
Bug: 175294473
Test: removed, the rest should pass
M compose/desktop/desktop/build.gradle
M compose/desktop/desktop/src/jvmMain/kotlin/androidx/compose/ui/window/DragGestureFilter.kt
M compose/desktop/desktop/src/jvmMain/kotlin/androidx/compose/ui/window/WindowDraggableArea.kt
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/src/commonMain/kotlin/androidx/compose/foundation/Clickable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/legacygestures/DragGestureFilter.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/legacygestures/PressIndicatorGestureFilter.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/legacygestures/TapGestureFilter.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/selection/Toggleable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldGestureModifiers.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldPressGestureFilter.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionContainer.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionManager.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/Scrollbar.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/text/selection/DesktopSelection.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/text/selection/DesktopSelectionManager.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextSelectionLongPressDragTest.kt
M compose/integration-tests/benchmark/src/androidTest/java/androidx/ui/pointerinput/ComposeTapIntegrationBenchmark.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
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/LongPressDragGestureFilterTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/LongPressGestureFilterComposeTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/PressIndicatorGestureFilterComposeTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/RawPressStartGestureFilterComposeTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/gesture/TouchSlopDragGestureFilterTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusManager.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/gesture/LongPressDragGestureFilter.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/window/DesktopPopup.kt
to...@gmail.com <to...@gmail.com> #15
Branch: androidx-main
commit b1670cdbfffb9d60a6d79eb06a3f80a7d1745322
Author: Matvei Malkov <malkov@google.com>
Date: Sat Feb 06 17:28:29 2021
Remove animation package from foundation and trasfer default spline based curves to aniamtion module.
Change-Id: I3f7c18be72b1b4e8d7958194b10d63d749f7d948
Relnote: smoothScrollBy and scrollBy methods' packages changed to androidx.compose.foundation.gestures.*
Relnote: android spline based decay curve moved from foundation to animation module
Test: pass + demos
Bug: 175294473
M compose/animation/animation-core/samples/src/main/java/androidx/compose/animation/core/samples/AnimatableSamples.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Animatable.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/SuspendAnimation.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
M compose/animation/animation/build.gradle
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/SwipeToDismissDemo.kt
M compose/animation/animation/src/androidMain/kotlin/androidx/compose/animation/AndroidActualDefaultDecayAnimationSpec.android.kt
M compose/animation/animation/src/androidMain/kotlin/androidx/compose/animation/AndroidFlingCalculator.android.kt
M compose/animation/animation/src/androidMain/kotlin/androidx/compose/animation/AndroidFlingSpline.android.kt
M compose/animation/animation/src/androidMain/kotlin/androidx/compose/animation/SplineBasedFloatDecayAnimationSpec.android.kt
A compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/DefaultDecayAnimationSpec.kt
M compose/animation/animation/src/desktopMain/kotlin/androidx/compose/animation/AndroidFlingCalculator.desktop.kt
M compose/animation/animation/src/desktopMain/kotlin/androidx/compose/animation/AndroidFlingSpline.desktop.kt
M compose/animation/animation/src/desktopMain/kotlin/androidx/compose/animation/DesktopActualDefaultDecayAnimationSpec.desktop.kt
M compose/animation/animation/src/desktopMain/kotlin/androidx/compose/animation/DesktopDefaultDecayAnimationSpec.desktop.kt
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/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/ListDemos.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ScrollerSamples.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyListsContentPaddingTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyScrollTest.kt
D compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/animation/AndroidFlingConfig.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/FlingBehavior.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/ScrollExtensions.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/ScrollableState.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyDsl.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyList.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeableTest.kt
le...@google.com <le...@google.com> #16
Branch: androidx-main
commit a414d089eadff2812d68146969008e006295e965
Author: Matvei Malkov <malkov@google.com>
Date: Fri Feb 05 14:47:28 2021
Make FlingBehavior to be a suspend based function as opposed to animation oriented concept.
This CL remakes FlingConfig into FlingBehavior to me an idiomatic customization fling + removed all the usages of the old FlingConfig and TargetAnimation
Test: ScrollableTest, LazyScrollTest, ScrollTest, SliderTest + new demo
Bug: 175294473
Change-Id: I02b8639c646d24fd19ef7ac504ef6660b8906d54
Relnote: FlingConfig has been renamed to FlingBehavior now allows for customization of suspend animation rather than predefined Decays.
Relnote: LazyColumn/Row now accept FlingBehavior to allow for fling curve granular customizations
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/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/ListDemos.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnTest.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/animation/AndroidFlingConfig.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Scroll.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/animation/FlingBehavior.kt
D compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/animation/FlingConfig.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyDsl.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyList.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/animation/DesktopFlingConfig.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/gesturescope/SendSwipeTest.kt
to...@gmail.com <to...@gmail.com> #17
Branch: androidx-main
commit 687e953d4f41088db7f0ea02a066be81f73817a0
Author: Matvei Malkov <malkov@google.com>
Date: Mon Feb 08 15:33:41 2021
Convert zoomable to suspend motion and add missing functionality.
Similar to Draggable and Scrollable, zoomable now works via priority-based suspend motion. While there, I migrated zoomable to transformable to handle pan and rotation as well because those 3 go hand by hand most of the time.
Change-Id: Ifc32b264ce6a99e17f38ac339bde498fe5b2337a
Relnote: Modifier.zoomable has been replaced my Modifier.transformable. smoothPanBy, smoothRotationBy have been added as a functionality.
Test: Added for new functionality
Bug: 175294473
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/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/HighLevelGesturesDemo.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/TransformableSample.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/TransformableTest.kt
D compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ZoomableTest.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Transformable.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/TransformableState.kt
D compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Zoomable.kt
M development/build_log_simplifier/messages.ignore
le...@google.com <le...@google.com>
to...@gmail.com <to...@gmail.com> #18
Branch: androidx-main
commit 6f03bb3277c8328d0dd5670824ae7b0307cb10c8
Author: Matvei Malkov <malkov@google.com>
Date: Tue Feb 09 20:29:34 2021
Fix documentation issues in foundational gestures
Bug: 175294473
Test: n/a
Change-Id: Ia586fdffd4bd9e8bbed3e663363e0909789914ca
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Orientation.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/TransformGestureDetector.kt
le...@google.com <le...@google.com> #19
Done?
to...@gmail.com <to...@gmail.com> #20
Yes. Fully migrated to the idiomatic suspend animation and input, deprecated and removed all the legacy gesture filters.
What's left is the internal implementation of the old filters internal to foundation, used in:
- text/ textfield selection (bug:
)b/179988949 - clickable due to alpha11 bug (bug:
andb/179988949 )b/179239764 - focus in ui uses it's own implementation of the old filter (bug:
)b/179602539
to...@gmail.com <to...@gmail.com> #21
Bump, RC is tagged :(
As I said I can do whatever debugging is necessary with the help of the user and would appreciate a way to move forward if you can't get the device.
to...@gmail.com <to...@gmail.com> #22
Really love the communication and the feeling that external devs are important and partners as all the communications says ;)
Can you check
If not can you check if that could be the cause, since from the bugs it's rare and touched the same kind of devices.
le...@google.com <le...@google.com> #23
Hi, we still don't have updates on this, still trying to get a hold of a similar device. Since this only happens with a single device model it's a bit tricky to reproduce. I talked with the team internally and it seems that any sort of additional debugging to actually find the issue would need to be done on the device.
The code change in
If not can you check if that could be the cause, since from the bugs it's rare and touched the same kind of devices.
Maybe the device is generating bad MotionEvents and that in turn can cause the scroll to not get the proper events to generate an accurate fling, but without a device to test it it would hard for us to know.
In the meantime, we can take a look at both the events that the pointer input system receives and the MotionEvents generated by the specific device vs a device where it works properly? Maybe that could give an insight on what type of events Compose is receiving.
For looking into the pointer input system events generated to a given composable you can do something like:
LazyColumn(modifier = Modifier.pointerInput(Unit) {
coroutineScope {
awaitEachGesture {
while (isActive){
awaitPointerEvent(pass = PointerEventPass.Initial).changes.forEach{
println("$it")
}
}
}
}
})
For looking into MotionEvents you can log inside dispatchTouchEvent of your root activity.
Let us know what you find out.
Thanks.
to...@gmail.com <to...@gmail.com> #24
Thanks, since I don't really know what I'm looking for I attached the logs from the user.
And a simple fling from my device (P6 Pro):
One big difference I can see is the classification.
All mine are: classification=AMBIGUOUS_GESTURE
all his are classification=NONE
18:18:10.442 Debug app.symfonik.music.player.debug V MediaGridKt$MediaGrid$1$1$1.invokeSuspend@89: pE: PointerInputChange(id=PointerId(value=15), uptimeMillis=555861375, position=Offset(70.0, 2008.0), pressed=true, pressure=0.31746033, previousUptimeMillis=555861375, previousPosition=Offset(70.0, 2008.0), previousPressed=false, isConsumed=false, type=Touch, historical=[],scrollDelta=Offset(0.0, 0.0))
18:18:10.448 Debug app.symfonik.music.player.debug V StartActivity.dispatchTouchEvent@377: dTE(true): MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=70.0, y[0]=2008.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=555861375, downTime=555861375, deviceId=4, source=0x1002, displayId=0, eventId=980593719 }
18:18:10.464 Debug app.symfonik.music.player.debug V StartActivity.dispatchTouchEvent@377: dTE(false): MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=70.0, y[0]=2008.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=AMBIGUOUS_GESTURE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=2, eventTime=555861396, downTime=555861375, deviceId=4, source=0x1002, displayId=0, eventId=725713755 }
18:18:10.478 Debug app.symfonik.music.player.debug V MediaGridKt$MediaGrid$1$1$1.invokeSuspend@89: pE: PointerInputChange(id=PointerId(value=15), uptimeMillis=555861413, position=Offset(104.0, 1938.0), pressed=true, pressure=0.36507937, previousUptimeMillis=555861375, previousPosition=Offset(70.0, 2008.0), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=555861400, position=Offset(70.0, 2008.0)), HistoricalChange(uptimeMillis=555861408, position=Offset(87.0, 1974.0)), HistoricalChange(uptimeMillis=555861413, position=Offset(104.0, 1938.0))],scrollDelta=Offset(0.0, 0.0))
18:18:10.480 Debug app.symfonik.music.player.debug V StartActivity.dispatchTouchEvent@377: dTE(true): MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=104.015724, y[0]=1937.9667, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=AMBIGUOUS_GESTURE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=3, eventTime=555861413, downTime=555861375, deviceId=4, source=0x1002, displayId=0, eventId=461611088 }
18:18:10.492 Debug app.symfonik.music.player.debug V MediaGridKt$MediaGrid$1$1$1.invokeSuspend@89: pE: PointerInputChange(id=PointerId(value=15), uptimeMillis=555861421, position=Offset(134.1, 1859.6), pressed=true, pressure=0.41269845, previousUptimeMillis=555861413, previousPosition=Offset(104.0, 1938.0), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=555861417, position=Offset(122.0, 1901.0)), HistoricalChange(uptimeMillis=555861421, position=Offset(134.0, 1860.0))],scrollDelta=Offset(0.0, 0.0))
18:18:10.495 Debug app.symfonik.music.player.debug V StartActivity.dispatchTouchEvent@377: dTE(true): MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=134.09256, y[0]=1859.6483, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=AMBIGUOUS_GESTURE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=2, eventTime=555861421, downTime=555861375, deviceId=4, source=0x1002, displayId=0, eventId=598428426 }
18:18:10.509 Debug app.symfonik.music.player.debug V MediaGridKt$MediaGrid$1$1$1.invokeSuspend@89: pE: PointerInputChange(id=PointerId(value=15), uptimeMillis=555861444, position=Offset(169.1, 1637.2), pressed=true, pressure=0.5714286, previousUptimeMillis=555861421, previousPosition=Offset(134.1, 1859.6), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=555861425, position=Offset(144.0, 1822.0)), HistoricalChange(uptimeMillis=555861429, position=Offset(152.0, 1783.0)), HistoricalChange(uptimeMillis=555861433, position=Offset(158.0, 1745.0)), HistoricalChange(uptimeMillis=555861437, position=Offset(163.0, 1704.0)), HistoricalChange(uptimeMillis=555861442, position=Offset(168.0, 1660.0))],scrollDelta=Offset(0.0, 0.0))
18:18:10.513 Debug app.symfonik.music.player.debug V StartActivity.dispatchTouchEvent@377: dTE(true): MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=169.06133, y[0]=1637.1816, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=AMBIGUOUS_GESTURE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=5, eventTime=555861444, downTime=555861375, deviceId=4, source=0x1002, displayId=0, eventId=561305389 }
18:18:10.531 Debug app.symfonik.music.player.debug V MediaGridKt$MediaGrid$1$1$1.invokeSuspend@89: pE: PointerInputChange(id=PointerId(value=15), uptimeMillis=555861460, position=Offset(171.9, 1437.4), pressed=true, pressure=0.6984127, previousUptimeMillis=555861444, previousPosition=Offset(169.1, 1637.2), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=555861445, position=Offset(170.0, 1617.0)), HistoricalChange(uptimeMillis=555861450, position=Offset(173.0, 1568.0)), HistoricalChange(uptimeMillis=555861454, position=Offset(175.0, 1518.0)), HistoricalChange(uptimeMillis=555861458, position=Offset(174.0, 1466.0))],scrollDelta=Offset(0.0, 0.0))
18:18:10.535 Debug app.symfonik.music.player.debug V StartActivity.dispatchTouchEvent@377: dTE(true): MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=171.88011, y[0]=1437.3815, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=AMBIGUOUS_GESTURE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=4, eventTime=555861460, downTime=555861375, deviceId=4, source=0x1002, displayId=0, eventId=488565489 }
18:18:10.550 Debug app.symfonik.music.player.debug V MediaGridKt$MediaGrid$1$1$1.invokeSuspend@89: pE: PointerInputChange(id=PointerId(value=15), uptimeMillis=555861479, position=Offset(120.4, 1172.2), pressed=true, pressure=0.8253969, previousUptimeMillis=555861460, previousPosition=Offset(171.9, 1437.4), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=555861462, position=Offset(170.0, 1412.0)), HistoricalChange(uptimeMillis=555861466, position=Offset(165.0, 1355.0)), HistoricalChange(uptimeMillis=555861471, position=Offset(152.0, 1295.0)), HistoricalChange(uptimeMillis=555861475, position=Offset(142.0, 1236.0)), HistoricalChange(uptimeMillis=555861479, position=Offset(122.0, 1177.0))],scrollDelta=Offset(0.0, 0.0))
18:18:10.550 Debug app.symfonik.music.player.debug V StartActivity.dispatchTouchEvent@377: dTE(true): MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=120.384636, y[0]=1172.1539, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=AMBIGUOUS_GESTURE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=5, eventTime=555861479, downTime=555861375, deviceId=4, source=0x1002, displayId=0, eventId=516541290 }
18:18:10.570 Debug app.symfonik.music.player.debug V MediaGridKt$MediaGrid$1$1$1.invokeSuspend@89: pE: PointerInputChange(id=PointerId(value=15), uptimeMillis=555861504, position=Offset(0.0, 863.0), pressed=true, pressure=0.87301594, previousUptimeMillis=555861479, previousPosition=Offset(120.4, 1172.2), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=555861483, position=Offset(104.0, 1123.0)), HistoricalChange(uptimeMillis=555861487, position=Offset(87.0, 1070.0)), HistoricalChange(uptimeMillis=555861491, position=Offset(71.0, 1017.0)), HistoricalChange(uptimeMillis=555861495, position=Offset(46.0, 974.0)), HistoricalChange(uptimeMillis=555861500, position=Offset(25.0, 932.0))],scrollDelta=Offset(0.0, 0.0))
18:18:10.572 Debug app.symfonik.music.player.debug V StartActivity.dispatchTouchEvent@377: dTE(true): MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=0.0, y[0]=863.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=AMBIGUOUS_GESTURE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=5, eventTime=555861504, downTime=555861375, deviceId=4, source=0x1002, displayId=0, eventId=989696186 }
18:18:10.573 Debug app.symfonik.music.player.debug V MediaGridKt$MediaGrid$1$1$1.invokeSuspend@89: pE: PointerInputChange(id=PointerId(value=15), uptimeMillis=555861508, position=Offset(0.0, 863.0), pressed=false, pressure=0.87301594, previousUptimeMillis=555861504, previousPosition=Offset(0.0, 863.0), previousPressed=true, isConsumed=false, type=Touch, historical=[],scrollDelta=Offset(0.0, 0.0))
18:18:10.575 Debug app.symfonik.music.player.debug V StartActivity.dispatchTouchEvent@377: dTE(true): MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=0.0, y[0]=863.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=555861508, downTime=555861375, deviceId=4, source=0x1002, displayId=0, eventId=866274337 }
to...@gmail.com <to...@gmail.com> #25
So after a lot of pain due to java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt;
in 1.5 I made him test snapshot 9725230 and the issue is still present.
Attached same logs in case that other PR did change the events received.
le...@google.com <le...@google.com> #26
Thanks for the logs, I'll take a look and report back.
to...@gmail.com <to...@gmail.com> #27
Bump?
le...@google.com <le...@google.com> #28
Hey, I took some time looking into the logs, the classification is not really a problem, even though it's different. In my own device the classification is None and I don't see the problem.
Something that caught my attention was that in one of the log files you sent I see a number of Cancel events in the middle of Move events. This might indicate that Motorola's implementation of the Root View is somehow canceling the move events. Any cancelation in the motion events will cause the inner draggable to emit a velocity of 0 to the fling system, which might explain the hiccups your user is seeing.
I'm assuming these events come from the Root Activity in your app and no compose hierarchy is outside of it, this is important because these events will have come straight from the system instead of another compose hierarchy that might send cancel events. If this assumption is correct and you'd like to confirm you might add markers to the logs to indicate the start/end of the flings. You can do this from a NestedScrollConnection around one of your lists. You can emit a log onPreScroll and another onPostFling, this should capture the whole range of a drag+fling movement. If in the middle of the movement you see a MotionEvent action cancel, then this indicates that the system is canceling the movement. The ideal log should be a down event followed by a series of move events and finally an up event.
If this is a device issue, you may ask the user if there has been a system update which might explain why they've only started seeing this recently.
In any case, let us know what you find out. Thanks.
to...@gmail.com <to...@gmail.com> #29
If this is a device issue, you may ask the user if there has been a system update which might explain why they've only started seeing this recently.
That's the first thing I asked him when he report the issue, before doing all the investigation.
This is not hardware as 2 devices does this He have 0 issues on any other applications (But not sure he have other recent compose apps). Reverting to the commit just before that patch does fix the issue for those devices.
The app activity is just a single setContent{}
there's no views or anything else and yes I added the logs there as requested.
I can add more logs to see the start and end but I suppose this would just confirm the cancel events, not the source if it happens outside of Compose.
Is there any change to have a workaround or something I can as an hack like filtering / rewriting the wrong events? I suppose a call or a system dialog during a drag would trigger a valid cancel event too?
le...@google.com <le...@google.com> #30
Hi, we're still waiting for the device. In the meantime, we're addressing some fixes in our velocity tracker that may help you as well. We received a report of a case similar to yours (a single device, this time a watch). They reported that using our fix resolved the problem for them, so it might solve for your as well.
The fix is still being tested, so it hasn't landed as the default behavior, but you can still access it by flipping this flag to true:
to...@gmail.com <to...@gmail.com> #31
Thanks, is this in 1.5 B1 or will only be in 1.6 A1?
le...@google.com <le...@google.com> #32
They will be available in the next alpha.
le...@google.com <le...@google.com> #33
Hi, we just received the device. Could you provide an apk with a version of the app where the issue is happening? I tried using a simple LazyColum/LazyGrid, but they scroll fine. Thanks!
to...@gmail.com <to...@gmail.com> #34
le...@google.com <le...@google.com> #35
Hi, thanks I was able to reproduce the issue using your PlayStore version. Using a simple LazyColum/LazyGrid doesn't have the same problem, so this means that there's some specific setup on your screen that may be causing this issue. Is there anything else you can tell us about those screens? From using your app it seems you have some pointer input interactions in the list items? In any case, I'll try to check if there's something different about this device's motion events.
to...@gmail.com <to...@gmail.com> #36
From the user report this touches everything that is scrollable.
The only thing I can think of that touches most of the screens would be the nestedScroll. (The container may change)
Box(
modifier = Modifier
.fillMaxSize()
.nestedScroll(topButtonBarState.nestedScrollConnection),
)
val nestedScrollConnection = remember<NestedScrollConnection> {
object : NestedScrollConnection {
override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
val delta = available.y
val newOffset = topBarOffsetPx.floatValue + delta
topBarOffsetPx.floatValue = newOffset.coerceIn(-topBarScrollDistancePx, 0f)
return Offset.Zero
}
}
}
Ho and yes most of the images can be long press to drag and drop:
@Composable
fun <T : Any> Draggable(
modifier: Modifier = Modifier,
dragDataProducer: () -> T,
content: @Composable (state: DraggableState) -> Unit,
) {
var iAmBeingDragged by remember { mutableStateOf(false) }
var iAmOverTarget by remember { mutableStateOf(false) }
var mySourcePosition by remember { mutableStateOf(Offset.Zero) }
val dragInfo = LocalDragInfo.current
val haptic = LocalHapticFeedback.current
LaunchedEffect(key1 = iAmOverTarget) {
if (iAmOverTarget) {
haptic.performHapticFeedback(HapticFeedbackType.LongPress)
}
}
Box(
propagateMinConstraints = false, // we stretch content if we are stretched
modifier = modifier
.onGloballyPositioned {
mySourcePosition = it.localToWindow(Offset.Zero)
}
.pointerInput(mySourcePosition) {
detectDragGesturesAfterLongPress(
onDragStart = {
dragInfo.isDragging = true
dragInfo.sourcePosition = mySourcePosition
dragInfo.dragPosition = mySourcePosition + it
dragInfo.draggableComposable = { content(DraggableState.DRAGGABLE) }
dragInfo.draggedData = dragDataProducer()
iAmBeingDragged = true
haptic.performHapticFeedback(HapticFeedbackType.LongPress)
},
onDragEnd = {
dragInfo.receivingAt?.let { receivingAt ->
if (receivingAt.contains(dragInfo.dragPosition + dragInfo.dragOffset)) {
dragInfo.draggedDataReceiver?.invoke(dragInfo.draggedData!!)
}
}
dragInfo.isDragging = false
dragInfo.dragOffset = Offset.Zero
iAmBeingDragged = false
},
onDragCancel = {
dragInfo.dragOffset = Offset.Zero
dragInfo.isDragging = false
iAmBeingDragged = false
},
onDrag = { change, dragAmount ->
change.consume()
dragInfo.dragOffset += Offset(dragAmount.x, dragAmount.y)
dragInfo.receivingAt?.let { receivingAt ->
iAmOverTarget = receivingAt.contains(dragInfo.dragPosition + dragInfo.dragOffset)
}
},
)
},
) {
content(if (iAmBeingDragged) DraggableState.NORMAL_DRAGGING else DraggableState.NORMAL)
}
}
to...@gmail.com <to...@gmail.com> #37
So just got another strange report today tied to the drag and drop posted above. Maybe it's linked as it seems there's also some wrong cancel events.
2023-06-06 01:26:42.504 Verbose/Logger: Information: XQ-CQ62/XQ-CQ62/33/13/XQ-CQ62/Sony/ 2023-06-06 01:26:42.505 Verbose/Logger: Information: 5.4.0 (1008[arm64-v8a,armeabi-v7a,armeabi]) - DisplayMetrics{density=2.8125, width=1080, height=2452, scaledDensity=2.8125, xdpi=449.704, ydpi=450.76} - FS:1.0 - AS:1.0
See video but the drag is randomly cancelled.
to...@gmail.com <to...@gmail.com> #38
Hum still no 1.6 release. Is there an ETA? (Like for next release day in 15) or is there some blocker due to U support and it will be longer?
I'd like to avoid playing with snapshots again to avoid too many side effects, but I'd still like to move on with the test :(
wb...@gmail.com <wb...@gmail.com> #39
From my logging with NestedScrollConnection, I see that in my case the onPreFling almost always has a zero available Velocity. If anybody has any idea on what could cause this?
to...@gmail.com <to...@gmail.com> #40
So the first issue seems fixed in 1.6 A1 and VelocityTrackerAddPointsFix
set to true just after SetContent
.
Is there known issues with this for the option to be disabled by default even if it's announced to be forced in RC?
Waiting for feedback about the second drag and drop issue.
to...@gmail.com <to...@gmail.com> #41
And got the confirmation that it fixes the other user drag and drop bug too.
Would love to have details about known issue / reasons it's off in A1 before putting that to open beta.
le...@google.com <le...@google.com> #42
Hey, I'm glad it fixes your issues. We will be conducting some experiments with the fix before landing it in full in the upcoming releases, that's why it's still turned off by default. The idea is to better understand the uses of our velocity tracker for further improvements. The final goal is that the flag will be removed and the final behavior will be with the fix.
to...@gmail.com <to...@gmail.com> #43
So there's no currently known blockers, just lack of tests and I can try in open beta and report back here? The open beta on that app is limited to 4K users but if I fix 2 users and break 3998 it won't be fun :)
le...@google.com <le...@google.com> #44
Aw, we do have tests in place. For context, this is a fix to the existing behavior that should approximate Compose velocities to the velocity calculation used by the platform. You should be safe and we will do a similar experiment on our side (that's why we're not turning it to true by default, we'd like to be extra sure the behavior is what we wanted it do be), but if you want to be even safer and you have the means I'd suggest you control the switching on/off of the flag using some remote config.
to...@gmail.com <to...@gmail.com> #45
That app have some targets providers that are full FOSS and their users don't like firebase/google trackers and want full offline functions so no remote config for that one.
I can add a temporary setting for the users to disable the feature if it's broken for them. Does changing the value instantly toggle the behavior or should I restart the app?
le...@google.com <le...@google.com> #46
It should be instant, since it's backed by state it will cause a recomposition.
to...@gmail.com <to...@gmail.com> #47
Ok perfect I'll do that then. Should we keep this issue opened and I report related issues here (if some occurs) or close and open new ones if needed?
le...@google.com <le...@google.com> #48
Yeah, I'll keep it open at least until we land the fix in full, and even then if your issue isn't fully fixed I'll keep it open :)
wb...@gmail.com <wb...@gmail.com> #49
I tried Compose 1.6alpha01 on an Android 7.1.1 device with the VelocityTrackerAddPointsFix set to true. On that device there is still no Fling present.
Eg a working device:
awaitPointerEvent: PointerInputChange(id=PointerId(value=9), uptimeMillis=293894052, position=Offset(238.5, 837.8), pressed=true, pressure=1.0, previousUptimeMillis=293894052, previousPosition=Offset(238.5, 837.8), previousPressed=false, isConsumed=false, type=Touch, historical=[],scrollDelta=Offset(0.0, 0.0))
awaitPointerEvent: PointerInputChange(id=PointerId(value=9), uptimeMillis=293894106, position=Offset(261.2, 921.8), pressed=true, pressure=1.0, previousUptimeMillis=293894052, previousPosition=Offset(238.5, 837.8), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=293894090, position=Offset(245.0, 750.5)), HistoricalChange(uptimeMillis=293894099, position=Offset(253.3, 780.3))],scrollDelta=Offset(0.0, 0.0))
onPreScroll available: Offset(0.0, 60.1) - Drag
onPostScroll available: Offset(0.0, 0.0) - Drag
onPostScroll consumed: Offset(0.0, 60.1)
awaitPointerEvent: PointerInputChange(id=PointerId(value=9), uptimeMillis=293894120, position=Offset(278.8, 987.7), pressed=true, pressure=1.0, previousUptimeMillis=293894106, previousPosition=Offset(261.2, 921.8), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=293894107, position=Offset(262.8, 814.3)), HistoricalChange(uptimeMillis=293894115, position=Offset(273.8, 852.3))],scrollDelta=Offset(0.0, 0.0))
onPreScroll available: Offset(0.0, 65.9) - Drag
onPostScroll available: Offset(0.0, 0.0) - Drag
onPostScroll consumed: Offset(0.0, 65.9)
awaitPointerEvent: PointerInputChange(id=PointerId(value=9), uptimeMillis=293894143, position=Offset(299.0, 1124.2), pressed=true, pressure=1.0, previousUptimeMillis=293894120, previousPosition=Offset(278.8, 987.7), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=293894123, position=Offset(281.8, 887.5)), HistoricalChange(uptimeMillis=293894132, position=Offset(289.8, 932.8)), HistoricalChange(uptimeMillis=293894140, position=Offset(297.0, 988.8))],scrollDelta=Offset(0.0, 0.0))
onPreScroll available: Offset(0.0, 136.5) - Drag
onPostScroll available: Offset(0.0, 0.0) - Drag
onPostScroll consumed: Offset(0.0, 136.5)
awaitPointerEvent: PointerInputChange(id=PointerId(value=9), uptimeMillis=293894157, position=Offset(307.5, 1255.0), pressed=true, pressure=1.0, previousUptimeMillis=293894143, previousPosition=Offset(299.0, 1124.2), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=293894148, position=Offset(303.3, 1058.3))],scrollDelta=Offset(0.0, 0.0))
awaitPointerEvent: PointerInputChange(id=PointerId(value=9), uptimeMillis=293894164, position=Offset(307.5, 1255.0), pressed=false, pressure=1.0, previousUptimeMillis=293894157, previousPosition=Offset(307.5, 1255.0), previousPressed=true, isConsumed=false, type=Touch, historical=[],scrollDelta=Offset(0.0, 0.0))
onPreScroll available: Offset(0.0, 130.8) - Drag
onPostScroll available: Offset(0.0, 0.0) - Drag
onPostScroll consumed: Offset(0.0, 130.8)
onPreFling available: (0.0, 7657.776) px/sec
onPreScroll available: Offset(0.0, 0.1) - Fling
onPostScroll available: Offset(0.0, 0.0) - Fling
onPostScroll consumed: Offset(0.0, 0.1)
...
onPostScroll consumed: Offset(0.0, 22.0)
onPreScroll available: Offset(0.0, 23.2) - Fling
onPostScroll available: Offset(0.0, 23.2) - Fling
onPostScroll consumed: Offset(0.0, 0.0)
onPostFling available: (0.0, 1901.2562) px/sec
onPostFling consumed: (0.0, 5756.5195) px/sec
The logs from the Android 7.1.x device:
awaitPointerEvent: PointerInputChange(id=PointerId(value=0), uptimeMillis=15408289, position=Offset(352.5, 1039.1), pressed=true, pressure=1.0, previousUptimeMillis=15408289, previousPosition=Offset(352.5, 1039.1), previousPressed=false, isConsumed=false, type=Touch, historical=[],scrollDelta=Offset(0.0, 0.0))
awaitPointerEvent: PointerInputChange(id=PointerId(value=0), uptimeMillis=15408307, position=Offset(353.0, 1034.7), pressed=true, pressure=1.0, previousUptimeMillis=15408289, previousPosition=Offset(352.5, 1039.1), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=15408302, position=Offset(352.5, 990.1))],scrollDelta=Offset(0.0, 0.0))
awaitPointerEvent: PointerInputChange(id=PointerId(value=0), uptimeMillis=15408323, position=Offset(355.5, 1014.6), pressed=true, pressure=1.0, previousUptimeMillis=15408307, previousPosition=Offset(353.0, 1034.7), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=15408312, position=Offset(353.5, 981.2))],scrollDelta=Offset(0.0, 0.0))
onPreScroll available: Offset(0.0, -9.5) - Drag
onPostScroll available: Offset(0.0, 0.0) - Drag
onPostScroll consumed: Offset(0.0, -9.5)
awaitPointerEvent: PointerInputChange(id=PointerId(value=0), uptimeMillis=15408395, position=Offset(398.4, 692.4), pressed=true, pressure=1.0, previousUptimeMillis=15408323, previousPosition=Offset(355.5, 1014.6), previousPressed=true, isConsumed=false, type=Touch, historical=[HistoricalChange(uptimeMillis=15408323, position=Offset(355.5, 965.2)), HistoricalChange(uptimeMillis=15408341, position=Offset(358.5, 937.2)), HistoricalChange(uptimeMillis=15408362, position=Offset(364.5, 892.2)), HistoricalChange(uptimeMillis=15408364, position=Offset(370.5, 845.3)), HistoricalChange(uptimeMillis=15408371, position=Offset(377.5, 784.3)), HistoricalChange(uptimeMillis=15408393, position=Offset(390.5, 714.4))],scrollDelta=Offset(0.0, 0.0))
onPreScroll available: Offset(0.0, -322.1) - Drag
onPostScroll available: Offset(0.0, 0.0) - Drag
onPostScroll consumed: Offset(0.0, -322.1)
awaitPointerEvent: PointerInputChange(id=PointerId(value=0), uptimeMillis=15408426, position=Offset(403.4, 541.5), pressed=true, pressure=1.0, previousUptimeMillis=15408395, previousPosition=Offset(398.4, 692.4), previousPressed=true, isConsumed=false, type=Touch, historical=[],scrollDelta=Offset(0.0, 0.0))
awaitPointerEvent: PointerInputChange(id=PointerId(value=0), uptimeMillis=15408472, position=Offset(403.4, 541.5), pressed=false, pressure=1.0, previousUptimeMillis=15408426, previousPosition=Offset(403.4, 541.5), previousPressed=true, isConsumed=false, type=Touch, historical=[],scrollDelta=Offset(0.0, 0.0))
onPreScroll available: Offset(0.0, -150.8) - Drag
onPostScroll available: Offset(0.0, 0.0) - Drag
onPostScroll consumed: Offset(0.0, -150.8)
onPreFling available: (0.0, 0.0) px/sec
onPostFling available: (0.0, 0.0) px/sec
onPostFling consumed: (0.0, 0.0) px/sec
Why is onPreFling available: (0.0, 0.0) px/sec always zero? I have a feeling this is what causes my issue. How would I be able to debug this further?
le...@google.com <le...@google.com> #50
Hi
wb...@gmail.com <wb...@gmail.com> #51
#50 as requested:
to...@gmail.com <to...@gmail.com> #52
Ok so it seems the new pointer fix does have side effects on fling. The native Compose one or the Chris banes Snapper.
I'm yet to build a repro and fully understand what's going on but on a LazyColumn with a small width and val flingBehavior = rememberSnapperFlingBehavior(listState, snapOffsetForItem = SnapOffsets.Start)
(Snapper version) then in some cases when you fling and end the fling gesture outside of the column the fling goes crazy.
When it happens typically, you fling up the lazycolumn start to scroll down as expected then quickly scroll up ultra fast up to the first item of the list.
Disabling VelocityTrackerAddPointsFix
restore proper behavior. This only occurs when the fling ends outside of the box of the column so no issue on full screen lazy column.
to...@gmail.com <to...@gmail.com> #53
Ok so no there other things broken with that option enabled :(
See attached videos OK is with that option off and NOK is with the option ON. As you can see the flings trigger erratic NestedScrollConnection data.
For that screen the NestedScrollConnection is :
internal class EnterAlwaysNestedScrollConnection(
private val offsetY: MutableState<Int>,
private val toolbarState: CollapsingToolbarState,
private val flingBehavior: FlingBehavior,
) : NestedScrollConnection {
private val scrollDelegate = ScrollDelegate(offsetY)
override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
val dy = available.y
val toolbar = toolbarState.height.toFloat()
val offset = offsetY.value.toFloat()
val consume = if (dy < 0) {
val toolbarConsumption = toolbarState.dispatchRawDelta(dy)
val remaining = dy - toolbarConsumption
val offsetConsumption = remaining.coerceAtLeast(-toolbar - offset)
scrollDelegate.doScroll(offsetConsumption)
toolbarConsumption + offsetConsumption
} else {
val offsetConsumption = dy.coerceAtMost(-offset)
scrollDelegate.doScroll(offsetConsumption)
val toolbarConsumption = toolbarState.dispatchRawDelta(dy - offsetConsumption)
offsetConsumption + toolbarConsumption
}
return Offset(0f, consume)
}
override suspend fun onPreFling(available: Velocity): Velocity {
val left = if (available.y > 0) {
toolbarState.fling(flingBehavior, available.y)
} else {
available.y
}
return Velocity(x = 0f, y = available.y - left)
}
}
Thanks to Scaleway I've lost a tons of time in urgent servers migrations that I need to recover so won't be able to build a smaller repro project for now. But can provide details or anything useful to help fix those as the cure seems worse than the decease.
le...@google.com <le...@google.com> #54
Thanks for reporting this, I'll go back to trying to get a fix for the issue.
to...@gmail.com <to...@gmail.com> #55
Were you able to reproduce? I might be able to schedule a couple of hours on trying to repro end of next week if not.
le...@google.com <le...@google.com> #56
Hey, yeah, I have a possible fix, trying to get it landed before the next release. Thanks!
to...@gmail.com <to...@gmail.com> #57
Ok thanks.
On my side I'll go in prod next week with 1.6 A1 and VelocityTrackerAddPointsFix on, but auto disabled on the bugged parts of the app and that user can opt out.
This might brings more reports, but so far after a week and +/- 2K users having that version active in the beta no other issues reported.
ap...@google.com <ap...@google.com> #58
Branch: androidx-main
commit 238ca86f557c82eb5fb92aa3d3ac9e52b917b602
Author: Levi Albuquerque <levima@google.com>
Date: Wed Jul 05 11:39:01 2023
Use previous event when no historical is available in VT.
The calculation was redundant when adding events to the VT when there was no historical data. If there's no historical delta, we should use the previous event data to calculate the delta and add it to the reference offset.
Relnote: N/A
Bug: 269487059
Test: Previous tests should pass.
Change-Id: I710db9ae7f280293289272640f7757ff7b061c0d
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/nestedscroll/NestedScrollModifierTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/viewinterop/VelocityTrackingParityTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/VelocityTracker.kt
to...@gmail.com <to...@gmail.com> #59
So quickly tested alpha 02 and #52 is fixed.
But #53 is still completely broken.
The workaround I use on that screen:
DisposableEffect(Unit) {
val saved = VelocityTrackerAddPointsFix
VelocityTrackerAddPointsFix = false
onDispose {
VelocityTrackerAddPointsFix = saved
}
}
The good news is that I did not get any other report of any other issue. So if we can figure out #53 I guess this will be good.
le...@google.com <le...@google.com> #60
That's odd, the fix I landed on #58 was addressed because of your report #53, the normal flings on a list stopped working properly when VelocityTrackerAddPointsFix was true. With #58 this should be fixed + the original. I'll need to check it again in this case.
to...@gmail.com <to...@gmail.com> #61
The flings are the #52 and are fixed.
The #53 is about values sent to NestedScrollConnection
I'm on kid duty this week but can try to debug / log stuff in my app if you can't repro. I did 0 checks on that part so no idea if the issue is the onPreFling
or onPreScroll
Just tell me what you need.
to...@gmail.com <to...@gmail.com> #62
Some quick logs:
As you can see there's some inversion in the onPreScroll values and a complete reduce of the values too.
It happens after the onPreFling
That code is a quoted earlier:
override suspend fun onPreFling(available: Velocity): Velocity {
val left = if (available.y > 0) {
toolbarState.fling(flingBehavior, available.y)
} else {
// If velocity < 0, the main content should have a remaining scroll space
// so the scroll resumes to the onPreScroll(..., Fling) phase. Hence we do
// not need to process it at onPostFling() manually.
available.y
}
return Velocity(x = 0f, y = available.y - left)
}
The state fling
function is :
suspend fun fling(flingBehavior: FlingBehavior, velocity: Float): Float {
var left = velocity
scroll {
with(flingBehavior) {
left = performFling(left)
}
}
return left
}
I do not change fling or snap in that screen so it's probably using DefaultFlingBehavior
, not sure what is happening there but I hope you do :)
Logs:
Not working
Up
17:06:14.712 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -6.5) - Drag
17:06:14.724 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -94.5) - Drag
17:06:14.734 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -125.9) - Drag
17:06:14.744 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -351.8) - Drag
17:06:14.751 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -221.0) - Drag
17:06:14.761 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -200.1) - Drag
17:06:14.772 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreFling-QWom1Mo@231: onPreFling: (0.0, 3595.06) px/sec
17:06:15.091 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.0) - Fling
17:06:15.100 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 5.7) - Fling
17:06:15.109 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 5.4) - Fling
17:06:15.118 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 4.9) - Fling
17:06:15.125 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 4.8) - Fling
17:06:15.133 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 3.7) - Fling
17:06:15.142 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 3.2) - Fling
17:06:15.150 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 3.0) - Fling
17:06:15.158 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 2.3) - Fling
17:06:15.166 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 2.0) - Fling
17:06:15.175 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 1.9) - Fling
17:06:15.183 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 1.4) - Fling
17:06:15.191 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 1.2) - Fling
17:06:15.200 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 1.1) - Fling
17:06:15.208 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.8) - Fling
17:06:15.217 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.7) - Fling
17:06:15.225 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.5) - Fling
17:06:15.233 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.5) - Fling
17:06:15.241 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.3) - Fling
17:06:15.250 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.2) - Fling
17:06:15.257 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.1) - Fling
17:06:15.267 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.0) - Fling
Down
17:06:27.898 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 80.6) - Drag
17:06:27.910 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 175.1) - Drag
17:06:27.921 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 233.2) - Drag
17:06:27.929 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 240.1) - Drag
17:06:27.932 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreFling-QWom1Mo@231: onPreFling: (0.0, -5988.225) px/sec
17:06:27.932 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.0) - Fling
17:06:27.938 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -95.6) - Fling
17:06:27.946 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -47.5) - Fling
17:06:27.954 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -53.0) - Fling
17:06:27.963 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -46.6) - Fling
17:06:27.971 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -46.1) - Fling
17:06:27.979 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -51.0) - Fling
17:06:27.988 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -44.5) - Fling
17:06:27.996 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -43.6) - Fling
17:06:28.004 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -48.1) - Fling
17:06:28.013 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -41.8) - Fling
17:06:28.020 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -40.8) - Fling
17:06:28.029 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -39.8) - Fling
17:06:28.037 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -43.5) - Fling
17:06:28.045 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -37.6) - Fling
17:06:28.053 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -36.6) - Fling
17:06:28.062 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -39.9) - Fling
17:06:28.071 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -34.4) - Fling
17:06:28.079 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -33.4) - Fling
17:06:28.089 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -36.3) - Fling
17:06:28.095 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -31.4) - Fling
17:06:28.104 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -30.3) - Fling
17:06:28.112 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -32.9) - Fling
17:06:28.120 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -28.4) - Fling
17:06:28.129 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -27.5) - Fling
17:06:28.136 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -29.8) - Fling
Working: Up
17:07:22.088 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -112.5) - Drag
17:07:22.099 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -132.7) - Drag
17:07:22.109 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -164.8) - Drag
17:07:22.120 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -209.3) - Drag
17:07:22.127 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -467.4) - Drag
17:07:22.140 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreFling-QWom1Mo@231: onPreFling: (0.0, -35351.68) px/sec
17:07:22.140 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -0.8) - Fling
17:07:22.157 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -847.5) - Fling
17:07:22.183 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -881.7) - Fling
17:07:22.229 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1753.3) - Fling
17:07:22.280 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1728.7) - Fling
17:07:22.332 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1692.4) - Fling
17:07:22.382 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1649.3) - Fling
17:07:22.441 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1847.9) - Fling
17:07:22.498 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1769.5) - Fling
17:07:22.561 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1910.3) - Fling
17:07:22.621 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1587.8) - Fling
17:07:22.678 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1527.2) - Fling
17:07:22.725 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1198.0) - Fling
17:07:22.776 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -1165.7) - Fling
17:07:22.812 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -734.7) - Fling
17:07:22.846 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -730.4) - Fling
17:07:22.870 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -521.8) - Fling
17:07:22.897 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -488.6) - Fling
17:07:22.912 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -335.2) - Fling
17:07:22.933 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -485.2) - Fling
17:07:22.953 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -324.9) - Fling
17:07:22.973 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -295.8) - Fling
17:07:22.989 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -312.7) - Fling
17:07:23.007 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -446.4) - Fling
17:07:23.026 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -278.6) - Fling
17:07:23.041 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -293.8) - Fling
17:07:23.057 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -134.4) - Fling
17:07:23.066 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -284.4) - Fling
17:07:23.078 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -133.0) - Fling
17:07:23.089 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -145.4) - Fling
17:07:23.096 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -129.2) - Fling
17:07:23.111 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -256.4) - Fling
17:07:23.119 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -140.6) - Fling
17:07:23.135 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -250.0) - Fling
17:07:23.142 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -136.8) - Fling
17:07:23.158 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -241.9) - Fling
17:07:23.169 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -135.1) - Fling
17:07:23.179 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -117.0) - Fling
17:07:23.189 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -248.7) - Fling
17:07:23.202 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -114.6) - Fling
17:07:23.211 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -112.8) - Fling
17:07:23.218 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -126.9) - Fling
17:07:23.229 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -112.8) - Fling
17:07:23.238 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -109.8) - Fling
17:07:23.253 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -232.4) - Fling
17:07:23.262 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, -108.6) - Fling
Down
17:07:58.523 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 102.3) - Drag
17:07:58.530 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 186.1) - Drag
17:07:58.541 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 196.6) - Drag
17:07:58.542 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreFling-QWom1Mo@231: onPreFling: (0.0, 32128.457) px/sec
17:07:58.565 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 0.7) - Fling
17:07:58.581 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 513.0) - Fling
17:07:58.601 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 544.8) - Fling
17:07:58.624 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 800.0) - Fling
17:07:58.653 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 795.9) - Fling
17:07:58.680 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 1041.7) - Fling
17:07:58.712 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 1028.2) - Fling
17:07:58.743 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 769.8) - Fling
17:07:58.765 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 759.2) - Fling
17:07:58.793 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 746.7) - Fling
17:07:58.815 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 733.3) - Fling
17:07:58.843 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 721.4) - Fling
17:07:58.868 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 707.7) - Fling
17:07:58.902 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 912.1) - Fling
17:07:58.928 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 886.7) - Fling
17:07:58.960 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 652.4) - Fling
17:07:58.977 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 637.0) - Fling
17:07:59.005 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 621.3) - Fling
17:07:59.026 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 391.3) - Fling
17:07:59.044 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 597.1) - Fling
17:07:59.061 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 394.2) - Fling
17:07:59.079 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 390.3) - Fling
17:07:59.093 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 179.7) - Fling
17:07:59.107 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 381.1) - Fling
17:07:59.115 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 173.9) - Fling
17:07:59.129 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 347.8) - Fling
17:07:59.142 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 192.1) - Fling
17:07:59.156 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 337.8) - Fling
17:07:59.168 Debug app.symfonik.music.player.debug E EnterAlwaysNestedScrollConnection.onPreScroll-OzD1aCk@225: onPreScroll: Offset(0.0, 188.5) - Fling
ap...@google.com <ap...@google.com> #63
Branch: androidx-main
commit 06b392045c5d52f3d17751f594d8b017dec83b0e
Author: Levi Albuquerque <levima@google.com>
Date: Wed Aug 09 14:44:49 2023
Fix VelocityTracker test flakiness: VelocityTrackingParityTest
The historical events were being transformed twice and that influenced how the reference point was used in the tracker. Removed the historical transformation. Added a new test to check the parity between lists: flinging a similar list in both Views and Compose should get us to a similar item position.
Fixes: 293188485
Bug: 269487059
Test: Previous Tests Should pass and added new tests.
Change-Id: I3a6b8d84e3cede969716d0468c2f70854cb1434a
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/viewinterop/VelocityTrackingListParityTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/viewinterop/VelocityTrackingParityTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/input/pointer/MotionEventAdapter.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/VelocityTracker.kt
A compose/ui/ui/src/main/res/layout/android_compose_lists_fling.xml
A compose/ui/ui/src/main/res/layout/android_compose_lists_fling_item.xml
to...@gmail.com <to...@gmail.com> #64
Ok so back from holidays and tested with a recent snapshot 10683443 that contains this and it's still broken for #62 #53
BTW I also got a new strange crash with that snapshot :
le...@google.com <le...@google.com> #65
Hey, I'm looking into 53 now, I'll let you know if something's up. From what I understand in your logs in 62, "Not Working" happens when you activate the flag and "Working" when you disable it, right?
to...@gmail.com <to...@gmail.com> #66
Yes exactly.
to...@gmail.com <to...@gmail.com> #67
Are you able to reproduce with the given code or need more?
le...@google.com <le...@google.com> #68
Hey, yeah, I'm working on a fix for everything :D I'll update here once it lands.
le...@google.com <le...@google.com> #69
Hey, I submitted a fix for this last Friday so if you want to have a look before the next release I think you can just use a recent snapshot. The fix is still behind the same flag though. Let me know how it goes :)
to...@gmail.com <to...@gmail.com> #70
Works with 10758292, and could not find regressions in the other parts of the app :)
That was a long running issue thanks for all the fixes.
Completely unrelated but do you think you can help me have
to...@gmail.com <to...@gmail.com> #71
So I do not have a Samsung device but it seems on some device Samsung allows apps to run in popup windows.
When in that mode the app does not receive any input at all. Even when leaving that mode does not restore touches. Only kill app and restart.
No idea what to log if you can't reproduce. But will again need you here.
Edit: Seems this also happens with Lineage OS that offers the same feature. (But can't reproduce on pixels with freeform dev option enabled)
ap...@google.com <ap...@google.com> #72
Branch: androidx-main
commit 2c9e34d057b648833264cd86dd6c4a55cb5fca61
Author: Levi Albuquerque <levima@google.com>
Date: Thu May 25 16:50:07 2023
Flipping the VT bug fix flag
Now VelocityTracker will have the bug fix by default.
Relnote: VelocityTracker will now have the fix for adding points on by default. The fix can still be turned off by setting VelocityTrackerAddPointsFix to false if there's any issues.
Fixes: 284114350
Fixes: 269487059
Fixes: 282893051
Fixes: 295879271
Bug: 318621681
Test: N/A
Change-Id: Ib3877b1f81f19899dd91e20542fa589bf6ed5399
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/util/VelocityTracker.kt
Description
Jetpack Compose component(s) used: Most of them
Android Studio Build: Girafe
Kotlin version: 1.8.10
Steps to Reproduce or Code Sample to Reproduce:
I don't know how to reproduce, I'm pretty sure he changed some settings on the device but can't find anything in Compose code to figure out what.
That user on his device Moto G Power (2021) have lost all velocity in scrolling / fling actions.
It touches all lazyRow/Column with or without snapFling.
See attached video.
He's the only one to report that, so I suppose this is something similar to compose animation respecting the Android dev settings about animation scale. But I can't figure out to what setting / parameter this could be related.