Status Update
Comments
ys...@google.com <ys...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
ys...@google.com <ys...@google.com> #3
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
ys...@google.com <ys...@google.com> #4
st...@google.com <st...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
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.