Status Update
Comments
ys...@google.com <ys...@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
ys...@google.com <ys...@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
ys...@google.com <ys...@google.com> #4
Reproducible with navigation-compose:2.4.0-beta02, without hilt.
st...@google.com <st...@google.com> #5
Could be related to this change
api("androidx.navigation:navigation-runtime:2.4.0-alpha10")
da...@google.com <da...@google.com>
st...@google.com <st...@google.com>
st...@google.com <st...@google.com> #7
See also these relevant tickets:
so it appears this is not a Wear Compose specific issue.
st...@google.com <st...@google.com> #8
Further info - if we revert the change mentioned in
il...@google.com <il...@google.com> #9
Calling LocalOwnersProvider
on a NavBackStackEntry
that has either never been created (unlikely, given that a NavBackStackEntry
is moved to CREATED
before it is given to any Navigator) or that has already been moved to destroyed (most likely) is indicative of a problem in SwipeDismissableNavHost
and how it handles onTransitionComplete()
- you should only be marking a transition as complete after that / synchronized with the removal of that destination from your composable hierarchy - thus ensuring that LocalOwnersProvider
won't be called on that particular NavBackStackEntry
ever again.
NavHost
does not run into this issue as it does handle transitions correctly, so this certainly seems to be something specific with SwipeDismissableNavHost
.
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit 4a229ca6ef4cef2d5679334737290d71fe027d7b
Author: stevebower <stevebower@google.com>
Date: Wed Dec 01 13:04:01 2021
Do not show navigation content until Lifecycle state CREATED.
aosp/1871175 changed lifecycle state handling so that a
NavBackStackEntry starts in state INITIALIZED. Given that
WearNavigator pushes destinations without transitions,
SwipeDismissableNavHost must no longer show content until the
entry has reached at least state CREATED. Fixing this allows
us to build against latest navigation libraries.
Test: androidx.wear.compose.navigation
Bug: 207328687
Relnote: "Fixed an issue where NavBackStackEntry has lifecycle
state INITIALIZED and should not be shown until it has
lifecycle state CREATED."
Change-Id: I40a2ba51ec8805007dd11f531a5807e60f595a0d
M wear/compose/compose-navigation/build.gradle
M wear/compose/compose-navigation/src/main/java/androidx/wear/compose/navigation/SwipeDismissableNavHost.kt
il...@google.com <il...@google.com>
ys...@google.com <ys...@google.com> #11
Which version is this fixed in? It seemed to still happen with 1.0.0-Alpha12, but maybe I missed something else. Can reconfirm if it's meant to be already fixed in released alphas.
st...@google.com <st...@google.com> #12
The fix was submitted after the 1.0.0-Alpha12 release - should be available as a SNAPSHOT build.
Description
Component used: Wear Activity Version used: 1.0.0-beta01 Devices/Android versions reproduced on: Wear Emulator (API 30)
Works with 1.0.0-alpha03
Error on 1.0.0-beta01
I have a non public repro but haven't created a standalone repro yet.