Class AngularNativeActivityDelegate
-
- All Implemented Interfaces:
public final class AngularNativeActivityDelegateInitializes the Activity for AngularNative navigation and provides all the hooks for an Activity to communicate with Angular Native code (and vice versa).
-
-
Field Summary
Fields Modifier and Type Field Description private final NavigatorcurrentNavigatorprivate final AngularNativeActivityactivity
-
Constructor Summary
Constructors Constructor Description AngularNativeActivityDelegate(AngularNativeActivity activity)
-
Method Summary
Modifier and Type Method Description final NavigatorgetCurrentNavigator()Get the Activity's currently active Navigator. final AngularNativeActivitygetActivity()The Activity to bind this delegate to. final UnitsetCurrentNavigator(NavigatorConfiguration configuration)Sets the currently active navigator in your Activity. final NavigatorHostfindNavigatorHost(@IdRes() Integer navigatorHostId)Finds the registered navigator host associated with the provided resource ID. final UnitresetSessions()Resets the sessions associated with all registered navigator hosts. final UnitresetNavigators()Resets all registered navigators via Navigator.reset. -
-
Constructor Detail
-
AngularNativeActivityDelegate
AngularNativeActivityDelegate(AngularNativeActivity activity)
-
-
Method Detail
-
getCurrentNavigator
final Navigator getCurrentNavigator()
Get the Activity's currently active Navigator.
Returns null if the navigator is not ready for navigation.
-
getActivity
final AngularNativeActivity getActivity()
The Activity to bind this delegate to.
-
setCurrentNavigator
final Unit setCurrentNavigator(NavigatorConfiguration configuration)
Sets the currently active navigator in your Activity. If you use multiple NavigatorHost instances in your app (such as for bottom tabs), you must update this whenever the current navigator changes.
-
findNavigatorHost
final NavigatorHost findNavigatorHost(@IdRes() Integer navigatorHostId)
Finds the registered navigator host associated with the provided resource ID.
- Returns:
The NavigatorHost instance if it's view has been created and it has been registered with the Activity, otherwise
null.
-
resetSessions
final Unit resetSessions()
Resets the sessions associated with all registered navigator hosts.
-
resetNavigators
final Unit resetNavigators()
Resets all registered navigators via Navigator.reset.
-
-
-
-