Skip to content
Snippets Groups Projects
activity_home.xml 4.21 KiB
Newer Older
<?xml version="1.0" encoding="utf-8"?><!--
Copyright (C) 2004-2015 Savoir-faire Linux Inc.
Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
Author: Adrien Béraud <adrien.beraud@savoirfairelinux.com>

This program 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.                                 
                                                                    
This program 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 this program; if not, write to the Free Software         
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.          
Emeric Vigier's avatar
Emeric Vigier committed
-->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".client.HomeActivity">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <android.support.v7.widget.Toolbar
            android:id="@+id/main_toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:background="@color/actionbar"
            android:elevation="4dp"
            android:gravity="bottom"
            android:longClickable="true"
            android:minHeight="?attr/actionBarSize"
            android:popupTheme="@style/Theme.AppCompat.Light.NoActionBar"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
            app:contentInsetStart="72dp"
            app:elevation="4dp"
            app:popupTheme="@style/Theme.AppCompat.Light.NoActionBar"
            app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
            app:titleMarginBottom="@dimen/action_bar_title_margin_bottom" />
        <FrameLayout
            android:id="@+id/main_frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_below="@id/main_toolbar"
            android:orientation="vertical" />
Emeric Vigier's avatar
Emeric Vigier committed

        <android.support.design.widget.FloatingActionButton
            android:id="@+id/action_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@+id/main_toolbar"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_marginBottom="@dimen/action_button_bpadding"
            android:layout_marginLeft="16dp"
            android:layout_marginStart="16dp"
            android:adjustViewBounds="false"
            android:baselineAlignBottom="false"
            android:elevation="6dp"
            android:visibility="gone"
            app:elevation="6dp"
            app:fabSize="mini" />
    </RelativeLayout>
    <android.support.design.widget.NavigationView
        android:id="@+id/left_drawer"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        android:theme="@style/AppThemeBase"
        android:windowBackground="@color/white"
        app:itemTextColor="?android:textColorPrimary"
        app:menu="@menu/drawer" />
Emeric Vigier's avatar
Emeric Vigier committed

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