Newer
Older
mountainnavigation / app / src / main / res / layout / activity_main.xml
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >

    <!-- As the main content view, the view below consumes the entire
         space available using match_parent in both dimensions. -->
    <RelativeLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
        <android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:src="@drawable/ic_plus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:clickable="true"
            android:layout_alignParentRight="true"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:layout_marginBottom="@dimen/fab_button_margin_bottom"
            android:layout_marginRight="@dimen/fab_button_margin_right"
            app:fabSize="normal"
            app:borderWidth="0dp"
            app:elevation="@dimen/fab_elevation"
            app:pressedTranslationZ="@dimen/fab_translation_z_pressed" />
    </RelativeLayout>

    <!-- The drawer is given a fixed width in dp and extends the full height of
         the container. -->
    <ListView android:id="@+id/navigation_drawer"
        android:layout_width="@dimen/navigation_drawer_width"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        app:elevation="16dp"
        android:background="#eee"
        android:name="de.apps4ics.mountainnavigation.NavigationDrawerFragment"
        tools:layout="@layout/drawer_main" />

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