

By clicking on the toggle icon, the drawer will open from the left side. It can be left side or right side according to us, we are creating it from the left side.

Navigation drawer toggle in android takes place on it.

Toolbar is fixed at the top of the screen. Use following component to create drawerLayout- ĭon’t forget to add the following line in this drawerLayout. There is no big difference between these two. Material design also provides drawerlayout. To create navigation drawer in android, we are using androidx library. We have to create all these three item inside the drawerlayout. It contains Toolbar, FrameLayout and NavigationView. It is the parent widget of the screen in which we want to add the drawer.
