blob: 67d25c5689553703af0f6b0cbea9ab01fe909d9f [file] [log] [blame]
Adrien Béraud433a8592015-06-17 16:25:44 -04001<?xml version="1.0" encoding="utf-8"?><!--
Adrien Béraudec528bb2016-01-14 16:52:51 -05002Copyright (C) 2004-2016 Savoir-faire Linux Inc.
Adrien Béraud04d822c2015-04-02 17:44:36 -04003
Adrien Béraud433a8592015-06-17 16:25:44 -04004Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
5Author: Adrien Béraud <adrien.beraud@savoirfairelinux.com>
6
Adrien Béraud04d822c2015-04-02 17:44:36 -04007This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Adrien Béraud04d822c2015-04-02 17:44:36 -040020-->
21
22<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
Adrien Béraud433a8592015-06-17 16:25:44 -040023 xmlns:app="http://schemas.android.com/apk/res-auto"
Adrien Béraudb179bab2015-10-08 12:04:22 -040024 xmlns:tools="http://schemas.android.com/tools"
Adrien Béraud04d822c2015-04-02 17:44:36 -040025 android:id="@+id/drawer_layout"
26 android:layout_width="match_parent"
Adrien Béraud433a8592015-06-17 16:25:44 -040027 android:layout_height="match_parent"
Adrien Béraudb179bab2015-10-08 12:04:22 -040028 android:fitsSystemWindows="true"
29 tools:context=".client.HomeActivity">
Adrien Béraud04d822c2015-04-02 17:44:36 -040030
Adrien Bérauddde513c2015-10-22 11:21:52 -040031 <RelativeLayout
32 android:layout_width="match_parent"
33 android:layout_height="match_parent">
34
35 <android.support.v7.widget.Toolbar
36 android:id="@+id/main_toolbar"
Adrien Béraud04d822c2015-04-02 17:44:36 -040037 android:layout_width="match_parent"
Adrien Bérauddde513c2015-10-22 11:21:52 -040038 android:layout_height="wrap_content"
39 android:layout_alignParentLeft="true"
40 android:layout_alignParentStart="true"
41 android:layout_alignParentTop="true"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040042 android:background="@color/color_primary_light"
Adrien Bérauddde513c2015-10-22 11:21:52 -040043 android:minHeight="?attr/actionBarSize"
44 android:popupTheme="@style/Theme.AppCompat.Light.NoActionBar"
45 android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040046 android:titleTextAppearance="@style/ToolbarTitle"
47 app:contentInsetStart="@dimen/toolbar_content_inset"
48 android:elevation="@dimen/toolbar_elevation"
49 app:elevation="@dimen/toolbar_elevation"
50 app:titleTextAppearance="@style/ToolbarTitle"/>
51
52 <LinearLayout
53 android:id="@+id/toolbar_spacer"
54 android:layout_width="match_parent"
55 android:layout_height="72sp"
56 android:orientation="horizontal"
57 android:elevation="@dimen/toolbar_elevation"
58 android:layout_below="@+id/main_toolbar"
59 android:background="@color/color_primary_light"
60 android:visibility="visible"
61 android:paddingLeft="@dimen/toolbar_content_inset"
62 android:gravity="center_vertical">
63
64 <TextView
65 android:id="@+id/toolbar_spacer_title"
66 android:layout_width="wrap_content"
67 android:layout_height="wrap_content"
68 android:text="@string/menu_item_accounts"
69 style="@style/ToolbarTitle"
70 android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
71 />
72
73 </LinearLayout>
Adrien Béraudb179bab2015-10-08 12:04:22 -040074
Adrien Bérauddde513c2015-10-22 11:21:52 -040075 <FrameLayout
76 android:id="@+id/main_frame"
77 android:layout_width="match_parent"
78 android:layout_height="match_parent"
79 android:layout_alignParentLeft="true"
80 android:layout_alignParentStart="true"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040081 android:layout_below="@+id/toolbar_spacer"
Adrien Bérauddde513c2015-10-22 11:21:52 -040082 android:orientation="vertical" />
Adrien Béraud433a8592015-06-17 16:25:44 -040083
Adrien Bérauddde513c2015-10-22 11:21:52 -040084 <android.support.design.widget.FloatingActionButton
85 android:id="@+id/action_button"
86 android:layout_width="wrap_content"
87 android:layout_height="wrap_content"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040088 android:layout_alignBottom="@+id/toolbar_spacer"
Adrien Bérauddde513c2015-10-22 11:21:52 -040089 android:layout_alignParentLeft="true"
90 android:layout_alignParentStart="true"
91 android:layout_marginBottom="@dimen/action_button_bpadding"
Adrien Béraudbd99d6a2015-11-23 16:04:49 -050092 android:layout_marginLeft="@dimen/action_button_lpadding"
Adrien Béraud7b6b20a2016-03-17 19:19:51 -040093 android:layout_marginStart="@dimen/action_button_lpadding"
Adrien Bérauddde513c2015-10-22 11:21:52 -040094 android:adjustViewBounds="false"
95 android:baselineAlignBottom="false"
Adrien Béraud7b6b20a2016-03-17 19:19:51 -040096 android:visibility="gone"
Adrien Bérauddde513c2015-10-22 11:21:52 -040097 app:elevation="6dp"
Adrien Béraudb968c2e2015-11-20 12:08:31 -050098 app:fabSize="mini"
99 app:pressedTranslationZ="12dp"
Alexandre Lision0b16eea2016-05-27 15:24:54 -0400100 app:rippleColor="@android:color/white">
101
102
103
104 </android.support.design.widget.FloatingActionButton>
Adrien Béraudb179bab2015-10-08 12:04:22 -0400105
Adrien Bérauddde513c2015-10-22 11:21:52 -0400106 </RelativeLayout>
Adrien Béraud04d822c2015-04-02 17:44:36 -0400107
Adrien Béraud433a8592015-06-17 16:25:44 -0400108 <android.support.design.widget.NavigationView
Adrien Béraud04d822c2015-04-02 17:44:36 -0400109 android:id="@+id/left_drawer"
Adrien Béraud433a8592015-06-17 16:25:44 -0400110 android:layout_width="wrap_content"
Adrien Béraud04d822c2015-04-02 17:44:36 -0400111 android:layout_height="match_parent"
112 android:layout_gravity="start"
Adrien Béraud433a8592015-06-17 16:25:44 -0400113 android:fitsSystemWindows="true"
114 android:theme="@style/AppThemeBase"
115 android:windowBackground="@color/white"
116 app:itemTextColor="?android:textColorPrimary"
117 app:menu="@menu/drawer" />
Adrien Béraud04d822c2015-04-02 17:44:36 -0400118
119</android.support.v4.widget.DrawerLayout>