Navigation drawers comes with mesmerizing access to destinations, functionality, switching collapsing tabs. Tabs can either be permanently on-screen or controlled by a navigation menu icon.
Navigation drawers are consumed for:
- Apps with five or more top-level targets,
- Apps with two or more levels of navigation hierarchy
- and Fast navigation between unrelated target.
Tabs are a good usage ” navigation” between sibling views.
ViewPager is a layout manager which allows to flip left and right through pages of data. ViewPager is most often used in utilization with Fragment.
Primary class used for tabs is TabLayout in the Android Design with Support Library.
One of the two standard adapters for using ViewPager: FragmentPagerAdapter or FragmentStatePagerAdapter. If a
ViewPager together with this layout, you can call
setupWithViewPager(ViewPager) to link the two together. This layout will be automatically populated from the
PagerAdapter‘s page titles.
The app bar or action bar, is one of the most important design elements because it provides a attractive structure and interactive elements that are user friendly. Using the app bar allowing users to quickly understand how to operate your app. The key functions of the app bar are as follows:
indicating and Identity the user’s location in the app.
Access to important actions in navigating and view switching with tabs or drop-down lists.
This class describes to use the v7 appcompat support library’s Toolbar widget as an app bar. There are other ways to implement an app bar—for example, some themes set up an ActionBar as an app bar by default—but using the appcompat Toolbar makes it easy to set up an app bar that works on the widest range of devices which can also be customized.
Some other Feature with app bar:
Set up the app bar: Allow add a Toolbar widget to activity, and set it as the activity’s app bar.
Add and handle actions:Allow add actions to the app bar and its overflow menu, and how to respond when users choose those actions.
Add an up action: Allow add an Up button to your app bar, so users can navigate back to the app’s home screen.
Use action views and action providers:Allow to use these widgets to provide advanced functionality in app bar.
Toolbar add TabLayout:
TabLayout provides a horizontal layout to display tabs.Population of the tabs to display is done through TabLayout.Tab instances. Creating tabs via newTab() can change the tab’s label or icon via setText(int) and setIcon(int) respectively. To add it to the layout via one of the addTabvia tab methods. Example App,
tabLayout.addTab(tabLayout.newTab().setText("Tab one")); FloatingActionButton: A material design floating action button. A floating action button is a circular icon button to promote a primary action in the application.