index.md 4.4 KB

//app/org.mjdev.tvapp.base.navigation/Screen

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.

Inheritors

DetailScreen
MainScreen
PlayerScreen
SplashScreen

Constructors

Screen [androidJvm]
constructor()
Create empty constructor for screen

Types

Name Summary
Companion [androidJvm]
object Companion

Functions

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?)

Properties

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