Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
since these are in public API (:/) we need to do this in 1.2
mu...@gmail.com <mu...@gmail.com> #3
since it is already marked as deprecated, we can probably do it by now.
d....@gmail.com <d....@gmail.com> #4
Opening diff shortly
an...@gmail.com <an...@gmail.com> #5
Project: platform/frameworks/support
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 fromhttps://github.com/androidx/androidx/pull/61 .
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
https://android-review.googlesource.com/1396827
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
an...@gmail.com <an...@gmail.com> #6
Tested on google PixelXL(API 29) also same issue so it's not device specific.
il...@google.com <il...@google.com> #7
There's a couple of problems here relating to how Dialogs and Fragments work:
1. Dialogs are separate windows that always sit above your activity's window. This means that the dialog will continue to intercept the system back button no matter what state the underlying FragmentManager is in or what FragmentTransactions you do.
2. Operations on the fragment container (i.e., your normal <fragment> destinations) don't affect dialog fragments. Same if you do FragmentTransactions on a nested FragmentManager.
The initial release of Navigation's <dialog> support did not take these limitations into account and would treat dialog destinations just like any other in that, from Navigation's point of view, they could be put on the back stack and treated like any other <fragment> destination.
As that's not actually the case, we've made a few changes for Navigation 2.1.0-alpha06 to ensure that Navigation's state of the world matches what you actually see on the screen and prevent crashes like that in comment#5 .
The summary of this is that <dialog> destinations are now automatically popped when navigate to a non-dialog and non-activity destination, such as a <fragment> destination. For reference, this was done inhttps://android-review.googlesource.com/996359 and https://android-review.googlesource.com/1007662
1. Dialogs are separate windows that always sit above your activity's window. This means that the dialog will continue to intercept the system back button no matter what state the underlying FragmentManager is in or what FragmentTransactions you do.
2. Operations on the fragment container (i.e., your normal <fragment> destinations) don't affect dialog fragments. Same if you do FragmentTransactions on a nested FragmentManager.
The initial release of Navigation's <dialog> support did not take these limitations into account and would treat dialog destinations just like any other in that, from Navigation's point of view, they could be put on the back stack and treated like any other <fragment> destination.
As that's not actually the case, we've made a few changes for Navigation 2.1.0-alpha06 to ensure that Navigation's state of the world matches what you actually see on the screen and prevent crashes like that in
The summary of this is that <dialog> destinations are now automatically popped when navigate to a non-dialog and non-activity destination, such as a <fragment> destination. For reference, this was done in
j....@gmail.com <j....@gmail.com> #8
So what I can do to show the dialog again when the user press back on the fragment?
[Deleted User] <[Deleted User]> #9
So what I can do to show the dialog again when the user press back on the fragment?
Is this still not possible?
ar...@gmail.com <ar...@gmail.com> #10
So, what you suggest to do for this case? Are there alternative solutions?
il...@google.com <il...@google.com> #11
Dialog destinations cannot be put on the back stack, that's still and will always be the case.
gu...@gmail.com <gu...@gmail.com> #12
I think the only solution at present is to make fragment B a full dialog
Description
Version used: 2.1.0-alpha04
Devices/Android versions reproduced on: S10
I am trying to navigation from DialogFragment to Fragment in Navigation Component, but getting weird result.
When I navigate from DialogFragment to Fragment, background fragment is changing to target fragment with current dialog on top of it, instead of just moving to target fragment. Why I am getting this behavior or how to fix it?
By fixing I mean normal dialog behavior. Say, I have a dialog D on top of a fragment A and move to a fragment B from a button on D, the screen should show B. And when I pop back from B, it should go to previous stage of D on top of A.
Here is the navigation graph.
<navigation
xmlns:android="
xmlns:app="
xmlns:tools="
android:id="@+id/home"
app:startDestination="@+id/titleScreen">
<fragment
android:id="@+id/titleScreen"
android:name="com.example.android.navigationadvancedsample.homescreen.Title"
android:label="@string/title_home"
tools:layout="@layout/fragment_title">
<action
android:id="@+id/action_title_to_about"
app:destination="@id/aboutScreen"/>
</fragment>
<dialog
android:id="@+id/aboutScreen"
android:name="com.example.android.navigationadvancedsample.homescreen.About"
android:label="@string/title_about"
tools:layout="@layout/fragment_about">
<action
android:id="@+id/action_aboutScreen_to_register"
app:destination="@id/register" />
</dialog>
<fragment
android:id="@+id/register"
android:name="com.example.android.navigationadvancedsample.formscreen.Register"
android:label="fragment_leaderboard"
tools:layout="@layout/fragment_leaderboard" />
</navigation>
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).