Status Update
Comments
il...@google.com <il...@google.com> #2
yu...@gmail.com <yu...@gmail.com> #3
since it is already marked as deprecated, we can probably do it by now.
il...@google.com <il...@google.com>
m....@futuremind.com <m....@futuremind.com> #4
co...@protonmail.com <co...@protonmail.com> #5
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request from
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit ce0a07e52f9bbc60ff0983101da22d782ddff391
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Aug 10 17:42:26 2021
Ensure we keep track of all transitioning entries
We currently keep up with all transitioning entries in a set, which
means we can't keep up with multiple entries that are considered "equal"
but actually are different objects.
This currently breaks navigate with popUpTo and transitions since we
will pop first, causing us to consider the old entry as transitioning,
then when we navigate we attempt to add the new entry as transitioning,
but since it is "equal" to the old one, the set just ignores the add.
We need to instead make transitionsInProgress a List, meaning we can
have multiple entries that "equal" each other. This also means we need
to be sure to clear all the "equal" entries from the list whenever one
of them is complete.
Relnote: "Re-selecting the same tab when using navigation compose with
multiple back stacks will no longer result in a blank screen."
Test: added testSameEntry
Bug: 194925622
Change-Id: I860dc9f2cc2516924c03dba491a37aa8ace99bb3
M navigation/navigation-common/api/current.txt
M navigation/navigation-common/api/public_plus_experimental_current.txt
M navigation/navigation-common/api/restricted_current.txt
M navigation/navigation-common/src/main/java/androidx/navigation/NavigatorState.kt
M navigation/navigation-testing/src/androidTest/java/androidx/navigation/testing/TestNavigatorStateTest.kt
M navigation/navigation-testing/src/main/java/androidx/navigation/testing/TestNavigatorState.kt
jb...@google.com <jb...@google.com> #7
This has been fixed internally and will be available in the Navigation 2.4.0-alpha07
release.
You can try this out by following the #7634339
.
yu...@gmail.com <yu...@gmail.com> #8
I don't know if it's related to this, but now my flows collected in compose screens via collectAsState complete early when I reselect already selected home tab. Similarly, it doesn't happen when current screen is root graph's startDestination.
yu...@gmail.com <yu...@gmail.com> #9
So I debugged more using the sample I previously provided and it seems like it's related to this, although it only happens when using flowWithLifecycle as described here:
Attaching the sample that shows the problems and the video.
In sample view model, there is simple flow that emits text in some interval.
In 2.4.0-alpha04 - Collecting flow directly via collectAsState or via rememberFlowWithLifecycle works as expected (interval Flow doesn't complete until the user leaves the screen)
In 2.4.0-alpha05-06 - Screen becomes empty tab reselection
In Snapshot #7634339:
- Tab reselection doesn't cause empty screens.
- Tab reselection doesn't cause early flow completion when collecting interval flow directly via collectAsState
- Tab reselection does cause early flow completion when collecting interval flow wrapped rememberFlowWithLifecycle (as show in attached video)
ro...@gmail.com <ro...@gmail.com> #10
mi...@gmail.com <mi...@gmail.com> #11
so...@gmail.com <so...@gmail.com> #12
jb...@google.com <jb...@google.com> #13
Please file a new bug with a minimal sample project that reproduces this issue.
mi...@gmail.com <mi...@gmail.com> #14
de...@gmail.com <de...@gmail.com> #15
Additionally, I attached two videos. One using Navigation 2.6.0 shows it is working fine, while the other video using Navigation 2.7.1 shows the strange behavior of a blank flash.
I tested all 2.7.x versions and the 2.8.0 alpha, and it's still happening.
Additionally, in some cases, the transition of the screens is that it enters from the upper right corner to the lower left. This behavior is bizarre and erratic since there is no defined animation, and it happens randomly on the screen. Only when many buttons on the screens are pressed quickly.
Feel free to tag me if there is any advance :(. (I am new here, IDK how this works)
yu...@gmail.com <yu...@gmail.com> #16
ja...@gmail.com <ja...@gmail.com> #17
if (navController.previousBackStackEntry != null) {
navController.popBackStack()
}
ja...@gmail.com <ja...@gmail.com> #18
onClick = {
if (selectedItemIndex != index) {
localNavController.navigate(
route = item.route,
builder = {
launchSingleTop = true
restoreState = true
popUpTo(localNavController.graph.startDestinationId) {
saveState = true
}
}
)
}
}
Description
Component used: Navigation Compose
Version used: androidx.navigation:navigation-compose:2.4.0-alpha05
Devices/Android versions reproduced on: Android 12 beta
Problem: When re-selecting the same tab (i.e clicking already selected tab), the screen becomes empty. It doesn't happen when current destination is the root graph's startDestination.
I first noticed this on my app, then confirmed it by trying it on github.com/chrisbanes/tivi and upgrading nav compose to 2.4.0-alpha05.