Fixed
Status Update
Comments
ca...@gmail.com <ca...@gmail.com> #3
since it is already marked as deprecated, we can probably do it by now.
ca...@gmail.com <ca...@gmail.com> #4
Opening diff shortly
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.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
il...@google.com <il...@google.com> #6
We've decided to rename createFragmentNavigator() to onCreateNavController(NavController) to make it more clear that this is something you can override to get a callback for when the NavController is created.
This will be available in Navigation 2.1.0-alpha03
This will be available in Navigation 2.1.0-alpha03
Description
Version used: 1.0.0-alpha09
Devices/Android versions reproduced on: N/A
I have started to make use of the Navigation Component and am very please with it. Well done!
Once recommendation I would like to make, however, is to add some better support for configuring custom Destinations when used with the NavHostFragment. The problem that I am having is that in order to configure a custom Destination Navigator, I need to get reference to the NavigatorProvider from the NavController. If I am using a NavHostFragment, then I must first load the Fragment to have its onCreate method called. I then must call navController.navigatorProvider.addNavigator(...) BEFORE I subsequently call navController.setGraph(...). This means that I cannot specify the graph directly in my XML. In fact, if I make use of the app:navGraph attribute I get a crash because my custom Destination nodes have no configured Navigators.
I've looked into extending NavHostFragment with an implementation that automatically calls navigatorProvider.addNavigator(...). But since the NavController is instantiated in NavHostFragment.onCreate() and the XML-configured graph resource ID is handled in the same method, there is no integration point between these 2 operations that allows for additional Navigators to be configured before the graph xml is inflated. As a result the only way that I've found to do the configuration is do the following:
1. Do NOT specify the NavHostFragment via a fragment tag in the XML. Instead add a FrameLayout container.
2. Manually instantiate an instance of NavHostFragment, and load it via a FragmentTransaction.
3. Manually configure the custom Destination Navigator via navHostFragment.navController.navigatorProvider.addNavigator(...)
4. Manually call navHostFragment.navController.setGraph(...)
It's not a huge problem, but it did take a good bit of experimenting before I figured this out. (I.e. the docs for custom destinations could be better.)
Perhaps a later version of NavHostFragment could have an additional overridable method that could be overridden to specify a list of additional Navigators. ?