Fixed
Status Update
Comments
jn...@google.com <jn...@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
jn...@google.com <jn...@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
jn...@google.com <jn...@google.com>
jn...@google.com <jn...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 005ca24b33a173e41f7657f9f1a42edf2dea4433
Author: John Nichol <jnichol@google.com>
Date: Wed Jun 01 17:58:35 2022
Fix ScalingLazyColumn initialization bug if the 0th list items was large
If the 0th list item in a ScalingLazyColumn is large enough it is possible that the list will not draw correctly until after the list has been scrolled. This is caused by the ScalingLazyColumn initially drawing items transparently in order to then do a correct scroll to the required initial item index without the user seeing the scroll. The calculation to determine whether to draw the items transparently or not was failing to correctly take into account the gap between list items and so could incorrectly determine that the list was still uninitialized.
Bug: 234328517
Test: ./gradlew :wear:compose:compose-material:connectedCheck --info --daemon
RelNote: "We have fixed a bug in the ScalingLazyColumn that could result in the list items not drawing correctly until scrolled if the 0th list item was large enough (including padding)"
Change-Id: Ic6159b18937d97f9bb580cf59810880288ad6d4e
M wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyListState.kt
M wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/ScalingLazyColumnTest.kt
https://android-review.googlesource.com/2112942
Branch: androidx-main
commit 005ca24b33a173e41f7657f9f1a42edf2dea4433
Author: John Nichol <jnichol@google.com>
Date: Wed Jun 01 17:58:35 2022
Fix ScalingLazyColumn initialization bug if the 0th list items was large
If the 0th list item in a ScalingLazyColumn is large enough it is possible that the list will not draw correctly until after the list has been scrolled. This is caused by the ScalingLazyColumn initially drawing items transparently in order to then do a correct scroll to the required initial item index without the user seeing the scroll. The calculation to determine whether to draw the items transparently or not was failing to correctly take into account the gap between list items and so could incorrectly determine that the list was still uninitialized.
Bug: 234328517
Test: ./gradlew :wear:compose:compose-material:connectedCheck --info --daemon
RelNote: "We have fixed a bug in the ScalingLazyColumn that could result in the list items not drawing correctly until scrolled if the 0th list item was large enough (including padding)"
Change-Id: Ic6159b18937d97f9bb580cf59810880288ad6d4e
M wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyListState.kt
M wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/ScalingLazyColumnTest.kt
jn...@google.com <jn...@google.com> #5
So we have managed to isolate and reproduce the problem on the emulator and add some targeted tests.
[Deleted User] <[Deleted User]> #6
Comment has been deleted.
[Deleted User] <[Deleted User]> #7
Thanks for the prompt response, so glad that root cause is found! :)
I would work-around the problem for now, so please let me know if the bug fix is released. Thanks again!
I would work-around the problem for now, so please let me know if the bug fix is released. Thanks again!
jn...@google.com <jn...@google.com> #8
Release in Compose for Wear OS rc01
jn...@google.com <jn...@google.com>
je...@tagheuer.com <je...@tagheuer.com> #9
Comment has been deleted.
Description
Version used: 1.0.0-beta02
Devices/Android versions reproduced on:
- Can be 100% reproduced on Samsung SM-R870, SM-R865F (both are Android 11, Wear 3.2, One UI 4.0)
- Failed to reproduce on Wear OS Simulator (API 30, Wear 3.2)
Description:
I found sometimes ScalingLazyColumn wouldn't display items at first until I scrolled the view. (My displayed items are not dynamically changed by recompose. The only thing I do is scrolling.)
And I also found that (1) if I add another item to ScalingLazyColumn and rebuild the app, or (2) if I add some vertical padding to one of the item,
items could be display successfully.
So I guess it might be related to the item height or item count... I'm not sure.
- Code:
(With the code above, the issue could be 100% reproduce on Samsung SM-R870, SM-R865F)