Is there a way to navigate to an activity using Jetpack Compose Navigation and pass a parameter (an ...
j
Is there a way to navigate to an activity using Jetpack Compose Navigation and pass a parameter (an Int in my case)? I can add an activity to the NavGraphBuilder using the
activity(route, ActivityNavigationDestinationBuilder)
extension, but I don't see a good way to add a bundle (or any data) that will get attached to the Activity when it's started.
i
Just like any other destination, the arguments are part of the route
j
On the composable extension, there is an
arguments
parameter than you can use to decode the arguments that are included as part of the route. The activity extension doesn't have an arguments parameter to do the same thing.
j
OK, I didn't see the arguments in the signature for
activity()
, but in the link you provided, I see the Kotlin DSL function to add arguments that I couldn't find before. Thank you for the timely answers!
378 Views