Navigation drawer below Actionbar

Bart Burg picture Bart Burg · Dec 3, 2014 · Viewed 12.6k times · Source

Right now I just started a project in Android Studio with the NavigationBar as preconfigured in the template. Apparently it puts the navigation drawer behind the actionbar. Many questions you find want the navigation drawer on top of the actionbar, I would like to have it start below the actionbar. This is what I currently have:

current situation

eventually desired situation:

desired situation

I have found this solution, but I think there should be an easier way.

Answer

Biu picture Biu · Dec 3, 2014

Apply this attribute to your root viewgroup android:layout_marginTop="?android:attr/actionBarSize". Hope this helps.