Skip to content

Instantly share code, notes, and snippets.

@smuldr
Created June 15, 2015 08:25
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smuldr/1390b12d6fdda8af8b03 to your computer and use it in GitHub Desktop.
Save smuldr/1390b12d6fdda8af8b03 to your computer and use it in GitHub Desktop.
Android NavigationView below Toolbar
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/abc_action_bar_default_height_material"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Real content goes here -->
<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- The navigation drawer -->
<android.support.design.widget.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:menu="@menu/drawer"/>
</android.support.v4.widget.DrawerLayout>
</LinearLayout>
@wzieba
Copy link

wzieba commented Aug 8, 2015

Thanks!

@rajeshct
Copy link

Thanks but their is little extra space at first item

@balasaheb143
Copy link

little extra space at first item

@kunalparmani01
Copy link

Thanks a lot dude

@CaviaTheGuineaPig
Copy link

wow, amazing, you're the best :D 💯

@nouhcc
Copy link

nouhcc commented Jun 14, 2018

Thanks dude you saved my day you really are the best

@suryaphani1729
Copy link

Thank you dude.....

@secp8x32
Copy link

Thank you man...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment