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 forIan Lake
01/18/2022, 11:39 PMstartDestination is a route.Lachlan McKee
01/18/2022, 11:40 PMLachlan McKee
01/18/2022, 11:41 PMLachlan McKee
01/18/2022, 11:44 PMIan Lake
01/18/2022, 11:46 PMLachlan McKee
01/18/2022, 11:48 PMLachlan McKee
01/18/2022, 11:53 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 AMLachlan McKee
01/19/2022, 12:01 AMLachlan McKee
01/19/2022, 12:02 AMLachlan McKee
01/19/2022, 12:04 AMIan Lake
01/19/2022, 12:04 AMIan Lake
01/19/2022, 12:06 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 NavHostIan 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 theĀSlidingPaneLayoutĀ destinationĀ and thenĀ navigate to the correct detail pane destination.SlidingPaneLayout
Ian Lake
01/19/2022, 12:10 AMLachlan McKee
01/19/2022, 12:10 AMIan Lake
01/19/2022, 12:10 AMIan Lake
01/19/2022, 12:11 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 wantIan Lake
01/19/2022, 12:16 AMAlex 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 AMLachlan McKee
01/19/2022, 12:18 AMLachlan McKee
01/19/2022, 12:18 AM