TrinityTuts

Transparent status bar in navigation drawer android

Last updated on March 13th, 2020 at 11:55 am

In my last post i explain how to create a navigation drawer in android application now in this post i update my code and update my navigation drawer. In this i make my status bar transparent as you see in most of google aps like youtube, play store app etc. Please check the video to check what we are going to make hope it was easy to you to understand.

Code: Transparent Status bar for navigation drawer

Step 1: Create A new Project and open build.gradle , add dependencies to it

Step 2: Create create custom toolbar  toolbar.xml file inside res =>layout 

Step 3: Add some color inside color.xml file before we start

Step 4:  Open  your  style.xml file & add following styles to it

also in your  String.xml file & add following string to it.

Step 5: Now create new xml file which we pass in listview to show menu on slide

Step 6: Create one more  Header.xml file to show header view in drawer item.

Step 7: now open  activity_main.xml file and add following code.

Step 8: Last but important step where we connect each and every thing.

Hope this post is helpfull 🙂