//app/org.mjdev.tvapp.base.navigation/Screen
open class Screen : NavController.OnDestinationChangedListener
Screen class.
This is base of all screens in application and auto creation of route and nav graph. This object represents one screen at time. Can contain menu that is exported to navigation drawer.
| DetailScreen |
| MainScreen |
| PlayerScreen |
| SplashScreen |
| Screen | [androidJvm] constructor() Create empty constructor for screen |
| Name | Summary |
|---|---|
| Companion | [androidJvm] object Companion |
| Name | Summary |
|---|---|
| Compose | [androidJvm] @Composable @CallSuper open fun Compose() Compose function. [androidJvm] @Composable open fun Compose(navController: NavHostController?, backStackEntry: NavBackStackEntry?, menuItems: List<MenuItem>, args: Map<String, Any?>) Compose function for compose screen. This should be only a method overridden in super classes. |
| onDestinationChanged | [androidJvm] open override fun onDestinationChanged(controller: NavController, destination: NavDestination, arguments: Bundle?) |
| Name | Summary |
|---|---|
| args | [androidJvm] open val args: List<NamedNavArgument> Screen arguments if any |
| completeRoute | [androidJvm] val completeRoute: String Complete autogenerated path / route with parameters |
| menuIcon | [androidJvm] open val menuIcon: ImageVector? = null Menu icon if any |
| menuItem | [androidJvm] val menuItem: MenuItem? Autogenerated menu item, if any Generated only if menuTitleResId 0 |
| menuTitleResId | [androidJvm] open val menuTitleResId: Int Menu string resource id menu is generated only if it returns id 0 |
| showOnce | [androidJvm] open val showOnce: Boolean = false Show once and hide on back pressed, remove from backstack |
| titleResId | [androidJvm] open val titleResId: Int Screen title |