Drawer Layout
Explore how to implement a drawer layout in your Android app to provide smooth navigation across multiple destinations. Understand how to create menu and header layouts, connect them with the drawer container, and manage navigation events in an activity.
We'll cover the following...
Drawer layout
The drawer layout is a menu container that contains navigation destinations. A user can slide it open and close after use. They’re normally recommended for applications with more than five fragments. Although our application has only three destinations, let’s learn how to create and use it.
Let’s go through the code.
Layouts
In the code snippet above, we have a menu layout called navigation_drawer_menu.xml that contains different options that a user can click to navigate to different destinations, like settings or a destination to rate the app.
The above code ...