Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation drawer below Actionbar

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.

like image 375
Bart Burg Avatar asked Dec 03 '14 21:12

Bart Burg


1 Answers

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

like image 89
Biu Avatar answered Oct 14 '22 12:10

Biu