Get Nav Drawer to slide beneath Toolbar/Actionbar



I've been working on the material design overhaul of my app. I curious to how you would change the activity_main xml code to get the nav drawer to slide open without covering the toolbar which contains that gorgeous new toggle button. Any Ideas how I can do this?


activity_main:



<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary" />

<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

<RelativeLayout
android:id="@+id/drawerView"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_gravity="start" >

<ListView
android:id="@+id/drawerList"
android:layout_width="250dp"
android:layout_height="match_parent"
android:layout_gravity="left"
android:background="@drawable/nav_border"
android:divider="@null" />
</RelativeLayout>
<!--
<fragment
android:id="@+id/fragment1"
android:name="com.shamu11.madlibsportable.MadlibsSelect"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
-->

</android.support.v4.widget.DrawerLayout>

No comments:

Post a Comment