-
- All Implemented Interfaces:
-
com.ramcosta.composedestinations.spec.RouteOrDirection,com.ramcosta.composedestinations.spec.TypedDestinationSpec,com.ramcosta.composedestinations.spec.TypedRoute
public interface ActivityDestinationSpec<T extends Object> implements TypedDestinationSpec<T>
-
-
Method Summary
Modifier and Type Method Description TargsFrom(Intent intent)Returns the arguments T that were passed to this ActivityDestination by checking the intent's extras. TargsFrom(SavedStateHandle savedStateHandle)Method that returns the navigation arguments class of this Composable for the savedStateHandle. UnitContent(DestinationScope<T> $self)Composable function that will be called to compose the destination content in the screen, when the user navigates to it. StringgetTargetPackage()StringgetAction()UrigetData()StringgetDataPattern()Class<out Activity>getActivityClass()DestinationStylegetStyle()CharSequencegetLabel()abstract StringgetRoute()Full route pattern that will be added to the navigation graph. abstract StringgetBaseRoute()Prefix of the route - basically route without argument info. List<NamedNavArgument>getArguments()List<NavDeepLink>getDeepLinks()-
Methods inherited from class com.ramcosta.composedestinations.spec.ActivityDestinationSpec
argsFrom, argsFrom -
Methods inherited from class com.ramcosta.composedestinations.spec.TypedDestinationSpec
invoke -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
argsFrom
T argsFrom(Intent intent)
Returns the arguments T that were passed to this ActivityDestination by checking the intent's extras.
-
argsFrom
T argsFrom(SavedStateHandle savedStateHandle)
Method that returns the navigation arguments class of this Composable for the savedStateHandle. This is useful when the SavedStateHandle is created with the navigation arguments, for example, inside the ViewModel.
If you're manually creating the ViewModel, use the
AbstractSavedStateViewModelFactoryand pass the NavBackStackEntry.arguments as the second constructor parameter. If you're using something like Hilt, then that is done for you out of the box.
-
Content
@Composable() Unit Content(DestinationScope<T> $self)
Composable function that will be called to compose the destination content in the screen, when the user navigates to it.
-
getTargetPackage
String getTargetPackage()
-
getDataPattern
String getDataPattern()
-
getActivityClass
Class<out Activity> getActivityClass()
-
getStyle
DestinationStyle getStyle()
-
getLabel
CharSequence getLabel()
-
getRoute
abstract String getRoute()
Full route pattern that will be added to the navigation graph. Navigation arguments are not filled in.
-
getBaseRoute
abstract String getBaseRoute()
Prefix of the route - basically route without argument info.
-
getArguments
List<NamedNavArgument> getArguments()
-
getDeepLinks
List<NavDeepLink> getDeepLinks()
-
-
-
-