Class AngularNativeBottomNavigationController
-
- All Implemented Interfaces:
-
androidx.navigation.NavController.OnDestinationChangedListener
public final class AngularNativeBottomNavigationController implements NavController.OnDestinationChangedListener
A BottomNavigationView controller that manages multiple AngularNativeBottomTabs, each associated with its own NavigatorHost instance in the Activity layout.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumAngularNativeBottomNavigationController.VisibilityThe visibility mode for the
BottomNavigationView.
-
Field Summary
Fields Modifier and Type Field Description private AngularNativeBottomNavigationController.Visibilityvisibilityprivate final AngularNativeBottomTabcurrentTabprivate final List<AngularNativeBottomTab>tabsprivate final AngularNativeActivityactivityprivate final BottomNavigationViewviewprivate final AngularNativeBottomNavigationController.VisibilityinitialVisibilityprivate final BooleanclearNavigationOnTabReselectionprivate final BooleananimateVisibilityChanges
-
Constructor Summary
Constructors Constructor Description AngularNativeBottomNavigationController(AngularNativeActivity activity, BottomNavigationView view, AngularNativeBottomNavigationController.Visibility initialVisibility, Boolean clearNavigationOnTabReselection, Boolean animateVisibilityChanges)
-
Method Summary
Modifier and Type Method Description final AngularNativeBottomNavigationController.VisibilitygetVisibility()Set the visibility of the BottomNavigationView.final UnitsetVisibility(AngularNativeBottomNavigationController.Visibility visibility)Set the visibility of the BottomNavigationView.final AngularNativeBottomTabgetCurrentTab()The currently selected tab in the BottomNavigationView. final List<AngularNativeBottomTab>getTabs()The tabs that have been loaded into the BottomNavigationView. final AngularNativeActivitygetActivity()final BottomNavigationViewgetView()final AngularNativeBottomNavigationController.VisibilitygetInitialVisibility()final BooleangetClearNavigationOnTabReselection()final BooleangetAnimateVisibilityChanges()final Unitload(List<AngularNativeBottomTab> tabs, Integer selectedTabIndex)Load the tabs and their navigator configurations into the BottomNavigationView. final UnitselectTab(Integer tabIndex)Select the tab for the provided index. final UnitsetOnTabSelectedListener(Function2<Integer, AngularNativeBottomTab, Unit> listener)Set a listener that will be notified when a navigation tab is selected. final Unitroute(String location, VisitOptions options, Bundle bundle, FragmentNavigator.Extras extras)Routes to the specified location in the current tab. UnitonDestinationChanged(NavController controller, NavDestination destination, Bundle arguments)-
-
Constructor Detail
-
AngularNativeBottomNavigationController
AngularNativeBottomNavigationController(AngularNativeActivity activity, BottomNavigationView view, AngularNativeBottomNavigationController.Visibility initialVisibility, Boolean clearNavigationOnTabReselection, Boolean animateVisibilityChanges)
-
-
Method Detail
-
getVisibility
final AngularNativeBottomNavigationController.Visibility getVisibility()
Set the visibility of the
BottomNavigationView.
-
setVisibility
final Unit setVisibility(AngularNativeBottomNavigationController.Visibility visibility)
Set the visibility of the
BottomNavigationView.
-
getCurrentTab
final AngularNativeBottomTab getCurrentTab()
The currently selected tab in the BottomNavigationView.
-
getTabs
final List<AngularNativeBottomTab> getTabs()
The tabs that have been loaded into the BottomNavigationView.
-
getActivity
final AngularNativeActivity getActivity()
-
getView
final BottomNavigationView getView()
-
getInitialVisibility
final AngularNativeBottomNavigationController.Visibility getInitialVisibility()
-
getClearNavigationOnTabReselection
final Boolean getClearNavigationOnTabReselection()
-
getAnimateVisibilityChanges
final Boolean getAnimateVisibilityChanges()
-
load
final Unit load(List<AngularNativeBottomTab> tabs, Integer selectedTabIndex)
Load the tabs and their navigator configurations into the BottomNavigationView.
- Parameters:
tabs- The list of AngularNativeBottomTab instances that correspond to the BottomNavigationView tabs.selectedTabIndex- The index of the initially selected tab.
-
setOnTabSelectedListener
final Unit setOnTabSelectedListener(Function2<Integer, AngularNativeBottomTab, Unit> listener)
Set a listener that will be notified when a navigation tab is selected.
-
route
final Unit route(String location, VisitOptions options, Bundle bundle, FragmentNavigator.Extras extras)
Routes to the specified location in the current tab. The resulting destination and its presentation will be determined using the path configuration rules.
- Parameters:
location- The location to navigate to.options- Visit options to apply to the visit.bundle- Bundled arguments to pass to the destination.extras- Extras that can be passed to enable Fragment specific behavior.
-
onDestinationChanged
Unit onDestinationChanged(NavController controller, NavDestination destination, Bundle arguments)
-
-
-
-