You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ Because this API can still be considered in the alpha phase, you should specify
107
107
| goBack | ```fun goBack(): Boolean```<br/><br/>Navigates back to the previous screen. If the user is on the home screen when this is called, this function will return false, meaning that there are no other screens to navigate back to. The app should exit when false is returned.<br/><br/>Before navigating to the previous screen, a check will be made to see if the current screen has a viewmodel managed by the Navigation Manager and determine if it has implemented the **onNavigateBack** function. If this function is implemented, it will be called. Depending on the value returned by **onNavigateBack**, the Navigation Manager will either proceed with navigating back or cancel the navigation. For the options you can use, see **NavigateBackOptions** below. |
108
108
| goBackImmediately | ```fun goBackImmediately(): Boolean```<br/><br/>This is essentially the same function as the **goBack** function, except no check is made for the implementation of the **onNavigateBack** function. If your screen calls **goBack** and has implemented the **onNavigateBack** function and returns **NavigateBackOptions.Cancel**, you can call **goBackImmediately** at a later time when your screen is ready to navigate to the previous screen. |
109
109
| navigateToHomeScreen | ```fun navigateToHomeScreen()```<br/><br/>Navigates to the home screen. The navigation history is cleared. If the user hits the Back button at this point, they would exit the app. Like the goBack function, this function will also check for the existence of the **onNavigateBack** function and call it if it exists. The value returned by **onNavigateBack** is processed the same way as it is with **goBack**. While calling **navigateToHomeScreen** may be thought of as navigating forward, it is in fact navigating back because the Navigation Manager removes all the previous screens from the stack until only the Home screen is left. |
110
-
| navigateToHomeScreenImmediately | This is essentially the same function as the **navigateToHomeScreen** function, except no check is made for the implementation of the **onNavigateBack** function. |
110
+
| navigateToHomeScreenImmediately | ```fun navigateToHomeScreenImmediately(): Boolean```<br/><br/>This is essentially the same function as the **navigateToHomeScreen** function, except no check is made for the implementation of the **onNavigateBack** function. This function always returns true and the return value has no meaning. |
111
111
| getNavInfo | ```fun getNavInfo(index: Int): NavigationInfo```<br/><br/>Returns navigation information for a specific item in the navigation stack. The index of the first item in the stack starts with zero and this will always be the home page. The last item in the stack is a placeholder screen and is not visible.<br/><br/>The property **onCloseScreen**is a LiveData observable that will get updated whenever the user navigates back to the previous screen. The value of the observable will be set to true to indicate to the observer to close the screen:<br/><br/>```navInfo?.onCloseScreen?.observeAsState(false)?.value``` |
112
112
| getNavInfoById | Returns a navigation info for an item in the navigation stack that has the specified id associated with it. Set the id using the id parameter of the **navigateTo** function. |
113
113
| observeScreenChange | ```fun observeScreenChange(callback: (screen: Any) -> Unit)```<br/><br/>Notifies subscribers whenever the Navigation Manager navigates to another screen or navigates back to a previous one. This should only be used by non-UI code to perform any necessary tasks whenever the screen changes. |
@@ -116,7 +116,7 @@ Because this API can still be considered in the alpha phase, you should specify
116
116
| totalScreensDisplayed | ```totalScreensDisplayed: Int```<br/><br/>The total number of screens on the navigation stack, minus one. This is essentially the same as **navStackCount** but doesn't include the placeholder screen. This is just a convenient way of knowing how many visible screens are currently being displayed. |
117
117
| currentScreenNavInfo | ```currentScreenNavInfo: NavigationInfo```<br/><br/>Returns navigation information about the currently displayed screen. |
118
118
| previousScreenNavInfo | ```previousScreenNavInfo: NavigationInfo?```<br><br>Returns navigation information about the previous screen. Returns null if there is no previous screen, which would be the case if the current screen is the home screen. This is useful in a case such as when you want to return data to the previous screen before navigating back. You can access the previous screen's viewmodel and call a function on it to pass data back before returning to the previous screen. |
119
-
| clearScreenCache | Removes all items from the screen cache. |
119
+
| clearScreenCache | ```fun clearScreenCache()```<br/><br/>Removes all items from the screen cache. |
120
120
| removeScreenFromCache | ```fun removeScreenFromCache(screenId: String)```<br/><br/>Removes the specified screen from the cache. |
0 commit comments