Fixed
Status Update
Comments
lp...@google.com <lp...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Louis Pullen-Freilich <
Link:
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
Expand for full commit details
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
These APIs allow overscroll to have events dispatched to it by one component, and rendered in a separate component.
Fixes: b/266550551
Fixes: b/204650733
Fixes: b/255554340
Fixes: b/229537244
Test: OverscrollTest
Relnote: "Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling APIs - these APIs create a wrapped instance of the provided overscroll effect that doesn't draw / handle events respectively, which allows for rendering overscroll in a separate component from the component that is dispatching events. For example, disabling drawing the overscroll inside a lazy list, and then drawing the overscroll separately on top / elsewhere."
Change-Id: Idbb3d91546b49c1987a041f959bce4b2b09a9f61
Files:
- M
compose/foundation/foundation/api/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/OverscrollDemo.kt
- M
compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
Hash: f64e25b7a473c757d080521e7dd97b3f6670f60d
Date: Fri Nov 01 18:43:56 2024
le...@google.com <le...@google.com>
le...@google.com <le...@google.com>
ap...@google.com <ap...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha06
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha06
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 9ff6dd9ba752c3c68119964c90d3be28ebde81a0
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Fri Sep 22 17:13:59 2023
Implement Draggable2d node, element, and modifier function
Draggable2dNode is implemented using AbstractDraggableNode providing the suitable behavior by implementing the abstract functions. The node was also used in the element to set up the modifier that will be used by users.
Bug: 214412658
Test: Tests will be added in a chain CL
Change-Id: I45b8f60ce602ae45cae86dbbbcd7f5debb1cd771
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable2d.kt
https://android-review.googlesource.com/2759052
Branch: androidx-main
commit 9ff6dd9ba752c3c68119964c90d3be28ebde81a0
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Fri Sep 22 17:13:59 2023
Implement Draggable2d node, element, and modifier function
Draggable2dNode is implemented using AbstractDraggableNode providing the suitable behavior by implementing the abstract functions. The node was also used in the element to set up the modifier that will be used by users.
Bug: 214412658
Test: Tests will be added in a chain CL
Change-Id: I45b8f60ce602ae45cae86dbbbcd7f5debb1cd771
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable2d.kt
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 1885e977423a2c5c0ef6c539fc278330443ec2a2
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Mon Sep 25 17:53:58 2023
Implementation of AbstractDraggableNode
An abstract class is added to the Draggable modifier that holds the dragging logic. The class will be implemented by both DraggableNode and Draggable2dNode. It will replace the logic in the DraggableNode when the changes are applied to Draggable.
Bug: 214412658
Test: N/A
Change-Id: I287f8323c1cbaff645691707d3b3ef9c8b99b728
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
https://android-review.googlesource.com/2759174
Branch: androidx-main
commit 1885e977423a2c5c0ef6c539fc278330443ec2a2
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Mon Sep 25 17:53:58 2023
Implementation of AbstractDraggableNode
An abstract class is added to the Draggable modifier that holds the dragging logic. The class will be implemented by both DraggableNode and Draggable2dNode. It will replace the logic in the DraggableNode when the changes are applied to Draggable.
Bug: 214412658
Test: N/A
Change-Id: I287f8323c1cbaff645691707d3b3ef9c8b99b728
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
sh...@google.com <sh...@google.com>
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 918e27aebdd1d9e1682846394ede9c4d5de23999
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Wed Oct 04 12:10:51 2023
Rename draggable2d to draggable2D
Refactored Draggable2D.kt file and Draggable2DTest.kt to change the name of the API to Draggable2D. This includes renaming all parts associated with the modifier (state, node, etc).
Bug: 214412658
Test: Previous tests should pass
Change-Id: Ie13218b1466e8204b1d2adcbadd3a87f4b8c753e
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/Draggable2DTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable2D.kt
https://android-review.googlesource.com/2769523
Branch: androidx-main
commit 918e27aebdd1d9e1682846394ede9c4d5de23999
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Wed Oct 04 12:10:51 2023
Rename draggable2d to draggable2D
Refactored Draggable2D.kt file and Draggable2DTest.kt to change the name of the API to Draggable2D. This includes renaming all parts associated with the modifier (state, node, etc).
Bug: 214412658
Test: Previous tests should pass
Change-Id: Ie13218b1466e8204b1d2adcbadd3a87f4b8c753e
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/Draggable2DTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable2D.kt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 421347e414e7ae8629d91296b47c11e28affb5cc
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Wed Oct 04 10:49:18 2023
Draggable2d tests
Added tests for the Draggable2d modifier.
Bug: 214412658
Test: Added test for Draggable2d modifier
Change-Id: Iac49e9fd3d73a09421b1621a0e4ffefad1df903c
A compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/Draggable2DTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/DraggableTest.kt
https://android-review.googlesource.com/2770276
Branch: androidx-main
commit 421347e414e7ae8629d91296b47c11e28affb5cc
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Wed Oct 04 10:49:18 2023
Draggable2d tests
Added tests for the Draggable2d modifier.
Bug: 214412658
Test: Added test for Draggable2d modifier
Change-Id: Iac49e9fd3d73a09421b1621a0e4ffefad1df903c
A compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/Draggable2DTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/DraggableTest.kt
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit 4f044d84db3002e838b4286e56b746695cb9fe4b
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Fri Oct 06 12:02:15 2023
Publish Draggable2D in Foundation
Added a sample and a benchmark test for the draggable2D modifier. These are added after making the API public as an Experimental API.
Relnote: Introduced a new `Draggable2D` API in Foundation. It can be used to give the ability for components to be dragged across the screen in 2 dimensions. See [Sample](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/Draggable2DSamples.kt )
Fixes: 214412658
Test: Existing tests should pass
Change-Id: Id95f5706cb31e2c0d4bbd17bb127f527a313df6f
M compose/foundation/foundation/api/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
A compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/Draggable2DSamples.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/Draggable2DTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable2D.kt
M compose/ui/ui/benchmark/src/androidTest/java/androidx/compose/ui/benchmark/ModifiersBenchmark.kt
https://android-review.googlesource.com/2775138
Branch: androidx-main
commit 4f044d84db3002e838b4286e56b746695cb9fe4b
Author: Shahd AbuDaghash <shahddaghash@google.com>
Date: Fri Oct 06 12:02:15 2023
Publish Draggable2D in Foundation
Added a sample and a benchmark test for the draggable2D modifier. These are added after making the API public as an Experimental API.
Relnote: Introduced a new `Draggable2D` API in Foundation. It can be used to give the ability for components to be dragged across the screen in 2 dimensions. See [Sample](
Fixes: 214412658
Test: Existing tests should pass
Change-Id: Id95f5706cb31e2c0d4bbd17bb127f527a313df6f
M compose/foundation/foundation/api/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
A compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/Draggable2DSamples.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/Draggable2DTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable2D.kt
M compose/ui/ui/benchmark/src/androidTest/java/androidx/compose/ui/benchmark/ModifiersBenchmark.kt
pr...@google.com <pr...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.6.0-alpha08
androidx.compose.foundation:foundation-android:1.6.0-alpha08
androidx.compose.foundation:foundation-desktop:1.6.0-alpha08
androidx.compose.ui:ui:1.6.0-alpha08
androidx.compose.ui:ui-android:1.6.0-alpha08
androidx.compose.ui:ui-desktop:1.6.0-alpha08
Description
There's a long standing feature request of having a 2d drag, similar to the one we have for 1d Modifier.draggable.
Right now people use their own version using lower level building blocks, but a few features will be missing in their code: InteractionSource support or mutex-based priority dragging being a few to mention.
We need to expose the right building blocks for easy wiring or provide a ready to use modifier for such cases. Seems like this issue might be a good foundation for 2d scroll as well ( b/214410040 ).
Over to Levi to start building up his backlog, but feel free to reassign to me or foundation alias if there are any questions or concerns.