Lachlan McKee
01/18/2022, 11:36 PMSiyamed
01/18/2022, 11:38 PMLachlan McKee
01/18/2022, 11:39 PMIan Lake
01/18/2022, 11:39 PMstartDestination
is or what it is used forstartDestination
is a route
.Lachlan McKee
01/18/2022, 11:40 PMIan Lake
01/18/2022, 11:46 PMLachlan McKee
01/18/2022, 11:48 PMIan Lake
01/18/2022, 11:56 PMLachlan McKee
01/18/2022, 11:56 PMIan Lake
01/18/2022, 11:59 PMLachlan McKee
01/19/2022, 12:00 AMnavigate(SECOND_PANE, "route")
Ian Lake
01/19/2022, 12:00 AMNavGraphBuilder.twoPaneComposable
helper method that sets up that one pane vs two pane approach is valid and usefulLachlan McKee
01/19/2022, 12:01 AMIan Lake
01/19/2022, 12:04 AMLachlan McKee
01/19/2022, 12:07 AMAlex Vanyo
01/19/2022, 12:08 AMNavHost
picks up the first “half” of the deep link,
and then defers the second “half” to the inner NavHost
Ian Lake
01/19/2022, 12:09 AMThe destinations in the detail pane's navigation graph should not be present in any outer, app-wide navigation graph. However, any deep links within the detail pane's navigation graph should be attached to the destination that hosts the. This ensures that external deep links first navigate to theSlidingPaneLayout
destination and then navigate to the correct detail pane destination.SlidingPaneLayout
Lachlan McKee
01/19/2022, 12:10 AMIan Lake
01/19/2022, 12:10 AMdefaultValue
and even the whole startDestination
are variables just like any otherLachlan McKee
01/19/2022, 12:12 AMIan Lake
01/19/2022, 12:15 AMstartDestination
to the route of your choice and using a defaultValue
on an argument for that start destination, to have any kind of 'dynamic route' you think you needLachlan McKee
01/19/2022, 12:15 AMIan Lake
01/19/2022, 12:16 AMdefaultValue
for the emailId
can certainly change to whatever you want, whenever you wantAlex Vanyo
01/19/2022, 12:17 AMval startIndex = 1
NavHost(
navController = navController,
startDestination = "deeplink/record/{index}",
) {
composable(
route = "deeplink/record/{index}",
arguments = listOf(navArgument("index") {
type = NavType.IntType,
defaultValue = startIndex
}),
content = { backStackEntry ->
...
}
)
}
Lachlan McKee
01/19/2022, 12:17 AM