<?xml version="1.0" encoding="utf-8"?>
<!--
	* This file is part of MountainNavigation.
	*
	* MountainNavigation is free software: you can redistribute it and/or modify
	* it under the terms of the GNU General Public License as published by
	* the Free Software Foundation, either version 3 of the License, or
	* (at your option) any later version.
	*
	* MountainNavigation is distributed in the hope that it will be useful,
	* but WITHOUT ANY WARRANTY; without even the implied warranty of
	* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	* GNU General Public License for more details.
	*
	* You should have received a copy of the GNU General Public License
	* along with MountainNavigation. If not, see <http://www.gnu.org/licenses/>.
	*
	* Copyright (c) 2016 Vinzenz Rosenkanz <vinzenz.rosenkranz@gmail.com>
	*
	* Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
-->
<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:elevation="@dimen/fab_elevation"
            app:pressedTranslationZ="@dimen/fab_translation_z_pressed"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/osm_contrib"
            android:textSize="10dp"
            android:autoLink="all"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_alignParentBottom="true"
            android:layout_marginBottom="2dp"
            android:layout_marginLeft="6dp"
            android:elevation="6dp"/>
    </RelativeLayout>

    <!-- The drawer is given a fixed width in dp and extends the full height of
         the container. -->
    <ScrollView
        android:layout_width="@dimen/navigation_drawer_width"
        android:layout_height="match_parent"
        android:background="#eee"
        android:layout_gravity="start"
        app:elevation="16dp"
        android:fillViewport="true"
        >
        <LinearLayout
            android:id="@+id/navigation_drawer"
            android:orientation="vertical"
            android:layout_height="match_parent"
            android:layout_width="match_parent">
                <ListView
                    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
                    android:name="de.apps4ics.mountainnavigation.NavigationDrawerFragment"
                    android:layout_height="wrap_content" android:choiceMode="singleChoice"
                    android:divider="@android:color/transparent" android:dividerHeight="0dp"
                    android:background="#ffff" tools:context=".NavigationDrawerFragment"
                    android:id="@+id/poiList"/>
                <ListView android:layout_width="match_parent"
                    android:layout_height="wrap_content" android:choiceMode="singleChoice"
                    android:divider="@android:color/transparent" android:dividerHeight="0dp"
                    android:background="#ffff" tools:context=".NavigationDrawerFragment"
                    android:id="@+id/menuList" />
        </LinearLayout>
    </ScrollView>
</android.support.v4.widget.DrawerLayout>
