Fixed
Status Update
Comments
ia...@gmail.com <ia...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 3c14b4adb72ce826b47d47f59d7058f5d5baec8f
Author: clarafok <clarafok@google.com>
Date: Thu Apr 14 14:01:26 2022
Add kdocs on responsbilities of implementing SavedStateRegistryOwner
Details on how to properly implement SaveStateRegistryOwner and
how to call the SavedStateRegistryController methods
Test: n/a
Fixes: 228887344
Change-Id: Iefc9519241d9d6844868e6833b33081aa6908b7f
M savedstate/savedstate/src/main/java/androidx/savedstate/SavedStateRegistryOwner.kt
https://android-review.googlesource.com/2065329
Branch: androidx-main
commit 3c14b4adb72ce826b47d47f59d7058f5d5baec8f
Author: clarafok <clarafok@google.com>
Date: Thu Apr 14 14:01:26 2022
Add kdocs on responsbilities of implementing SavedStateRegistryOwner
Details on how to properly implement SaveStateRegistryOwner and
how to call the SavedStateRegistryController methods
Test: n/a
Fixes: 228887344
Change-Id: Iefc9519241d9d6844868e6833b33081aa6908b7f
M savedstate/savedstate/src/main/java/androidx/savedstate/SavedStateRegistryOwner.kt
il...@google.com <il...@google.com> #3
Discharge from hospital says I have baby blue
ma...@gmail.com <ma...@gmail.com> #4
What is contacted Dependent personality disorder
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #5
Something like mono
[Deleted User] <[Deleted User]> #7
Component used: Navigation graph
Version used: 1.0.0-rc02
Devices/Android versions reproduced on: Device running Android P, compiled in SDK 28
Marked as fixed.
1.declare NavHostFragment with id
2. Inflate the container
3. declare navGraph with id
4.Extract from Intent
5. val navArgument= NavArgument.Builder().setDefaultValue("Required Bundle").build()
6.Add argument with graph
val navHostFragment = container as NavHostFragment
val inflater = navHostFragment.navController.navInflater
val graph = inflater.inflate(R.navigation.wash_request)
var place : String = intent?.getStringExtra("place") as String
var latlong : String = intent?.getStringExtra("latlong") as String
var selectCar = CarWashDetail(place,latlong)
val navArgument= NavArgument.Builder().setDefaultValue(selectCar).build()
graph.addArgument("CarWashDetails",navArgument)
navHostFragment.navController.graph = graph
Version used: 1.0.0-rc02
Devices/Android versions reproduced on: Device running Android P, compiled in SDK 28
Marked as fixed.
1.declare NavHostFragment with id
2. Inflate the container
3. declare navGraph with id
4.Extract from Intent
5. val navArgument= NavArgument.Builder().setDefaultValue("Required Bundle").build()
6.Add argument with graph
val navHostFragment = container as NavHostFragment
val inflater = navHostFragment.navController.navInflater
val graph = inflater.inflate(R.navigation.wash_request)
var place : String = intent?.getStringExtra("place") as String
var latlong : String = intent?.getStringExtra("latlong") as String
var selectCar = CarWashDetail(place,latlong)
val navArgument= NavArgument.Builder().setDefaultValue(selectCar).build()
graph.addArgument("CarWashDetails",navArgument)
navHostFragment.navController.graph = graph
Description
Version used: 1.0.0-alpha01
Devices/Android versions reproduced on: Device running Android P, compiled in SDK 27
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).
In order to instantiate the view of my first fragment, some data needs to be passed from the current Activity to the primary fragment. Currently, I don't see a clear way to do this. In the same way one can navigate from fragment to fragment while passing arguments via the NavController's navigate method, it would be helpful if there was some method to pass a bundle to the first nav fragment and update the graph associated with the NavHostFragment before inflating the view.
Please do let me know if there is some way to do this that I'm missing. Currently I'm setting up a dummy fragment to start with that will manage passing the data to the intended first fragment.