Create a project and select the template “Navigation Drawer Activity”. You will get the ToolBar, Drawer and navigation stuff for free as shown in the screenshot.
Now, let’s assume that we got a request to move the drawer under the ToolBar. We need to modify activity_main.xml for that.
Create vertical LinearLayout and make it wrapping DrawerLayout
Open app_bar_main.xml copy AppBarLayout and paste it as a first item in the previously created LinearLayout.
Also from the app_bar_main.xml get the include (content_main) and put it as a first child of DrawerLayout instead of existing include of app_bar_main.xml.
Delete app_bar_main.xml file
In v21\styles.xml – remove the line that makes status bar transparent.
Simple and funny tutorial about dependency injection library Dagger 2.
In other words, manually managing the dependency injection is like, mining the dragon glass — taking permission from the dragon queen and then forging them as weapons and then to go and fight with the White Walkers (hard dependency issues). Dagger 2 framework is like the valyrian swords — it’s been created by masters and all you need is to just wield it.