Contents
The navigation drawer is a UI panel that shows your app’s main navigation menu. The drawer appears when the user touches the drawer icon in the app bar or when the user swipes a finger from the left edge of the screen.
What is a navigation tab?
Navigation tabs are derived from the idea of folders in a file-cabinet and are thus familiar to the end user. Navigation tabs provide a clear visual indication of what content can be found on a website and places the current location in context by highlighting it.
com.google.android.material.navigation.NavigationView. Represents a standard navigation menu for application. The menu contents can be populated by a menu resource file. NavigationView is typically placed inside a DrawerLayout .
What’s the difference between tab navigation and stack navigation?
And there we have it, we can now navigate between screens using our stack navigation. Tab navigation is a navigation that is tabbed at either the bottom or top of a screen and can be used to switch between different screens. Tab navigation can take in either the screen as a component or a Stack as the component.
We already have two menus in drawer. When the Home menu is tapped, let’s add TabA and TabB as tab navigators and let’s add stack navigator to the details of TabA. Puzzled? Oh come on, don’t worry! you will love the code we will make our intended application functional.
Which is the right side of the screen for navigation?
Common pattern in navigation is to use drawer from left (sometimes right) side for navigating between screens. Before continuing, first install @react-navigation/drawer:
It’s common to attempt to use a standalone tab bar component without integrating it into the navigation library you use in your app. In some cases, this works fine! You should be warned, however, that you may run into some frustrating unanticipated issues when doing this.