Step by step guide on how to create Navigation drawer app using fragments
- create a basic android app with empty activity
- we need some essential files to be created first these files are as follows
a) menu file (drawer_menu) // android resource file in res folder b) drawer_header // design it accordingly give it a fixed width c) drawer_toolbar // make Toolbar view(make sure it is AppCompatWidgetToolbar) with height attribute for this as attr/actionBarSize d) add a frame layout to contain fragments - come to activity_main
- change constraint layout to drawer_layout
- <include
set height, width, id, and layout reference as drawer_toolbar
- <include
contain_view layout
- add NavigationView set app:menu as drawer_menu set app:header as drawer_header set layout_gravity as start set fitsSystemWindows as true