blob: 29013ff0bb6ae91419324721c8fce0de15e1a144 [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"
Aline Bonnetf6c2a402016-12-14 15:25:40 -050029 android:saveEnabled="false"
Adrien Béraudb179bab2015-10-08 12:04:22 -040030 tools:context=".client.HomeActivity">
Adrien Béraud04d822c2015-04-02 17:44:36 -040031
Adrien Bérauddde513c2015-10-22 11:21:52 -040032 <RelativeLayout
Aline Bonnetf6c2a402016-12-14 15:25:40 -050033 android:id="@+id/content_frame"
Adrien Bérauddde513c2015-10-22 11:21:52 -040034 android:layout_width="match_parent"
Aline Bonnetf6c2a402016-12-14 15:25:40 -050035 android:layout_height="match_parent"
36 android:paddingLeft="@dimen/drawer_content_padding">
Adrien Bérauddde513c2015-10-22 11:21:52 -040037
38 <android.support.v7.widget.Toolbar
39 android:id="@+id/main_toolbar"
Adrien Béraud04d822c2015-04-02 17:44:36 -040040 android:layout_width="match_parent"
Adrien Bérauddde513c2015-10-22 11:21:52 -040041 android:layout_height="wrap_content"
42 android:layout_alignParentLeft="true"
43 android:layout_alignParentStart="true"
44 android:layout_alignParentTop="true"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040045 android:background="@color/color_primary_light"
Alexandre Lisionbdb5f472016-11-11 15:59:50 -050046 android:elevation="@dimen/toolbar_elevation"
Adrien Bérauddde513c2015-10-22 11:21:52 -040047 android:minHeight="?attr/actionBarSize"
48 android:popupTheme="@style/Theme.AppCompat.Light.NoActionBar"
49 android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040050 android:titleTextAppearance="@style/ToolbarTitle"
51 app:contentInsetStart="@dimen/toolbar_content_inset"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040052 app:elevation="@dimen/toolbar_elevation"
Alexandre Lisionbdb5f472016-11-11 15:59:50 -050053 app:titleTextAppearance="@style/ToolbarTitle" />
Alexandre Lision0b16eea2016-05-27 15:24:54 -040054
55 <LinearLayout
56 android:id="@+id/toolbar_spacer"
57 android:layout_width="match_parent"
58 android:layout_height="72sp"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040059 android:layout_below="@+id/main_toolbar"
60 android:background="@color/color_primary_light"
Alexandre Lisionbdb5f472016-11-11 15:59:50 -050061 android:elevation="@dimen/toolbar_elevation"
62 android:gravity="center_vertical"
63 android:orientation="horizontal"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040064 android:paddingLeft="@dimen/toolbar_content_inset"
Alexandre Lisionbdb5f472016-11-11 15:59:50 -050065 android:visibility="gone">
Alexandre Lision0b16eea2016-05-27 15:24:54 -040066
Alexandre Lisionbdb5f472016-11-11 15:59:50 -050067 <TextView
68 android:id="@+id/toolbar_spacer_title"
69 style="@style/ToolbarTitle"
70 android:layout_width="wrap_content"
71 android:layout_height="wrap_content"
72 android:text="@string/menu_item_accounts"
73 android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
Alexandre Lision0b16eea2016-05-27 15:24:54 -040074
Alexandre Lisionbdb5f472016-11-11 15:59:50 -050075 </LinearLayout>
Adrien Béraudb179bab2015-10-08 12:04:22 -040076
Adrien Bérauddde513c2015-10-22 11:21:52 -040077 <FrameLayout
78 android:id="@+id/main_frame"
79 android:layout_width="match_parent"
80 android:layout_height="match_parent"
81 android:layout_alignParentLeft="true"
82 android:layout_alignParentStart="true"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040083 android:layout_below="@+id/toolbar_spacer"
Adrien Bérauddde513c2015-10-22 11:21:52 -040084 android:orientation="vertical" />
Adrien Béraud433a8592015-06-17 16:25:44 -040085
Adrien Bérauddde513c2015-10-22 11:21:52 -040086 <android.support.design.widget.FloatingActionButton
87 android:id="@+id/action_button"
88 android:layout_width="wrap_content"
89 android:layout_height="wrap_content"
Alexandre Lision0b16eea2016-05-27 15:24:54 -040090 android:layout_alignBottom="@+id/toolbar_spacer"
Adrien Bérauddde513c2015-10-22 11:21:52 -040091 android:layout_alignParentLeft="true"
92 android:layout_alignParentStart="true"
93 android:layout_marginBottom="@dimen/action_button_bpadding"
Adrien Béraudbd99d6a2015-11-23 16:04:49 -050094 android:layout_marginLeft="@dimen/action_button_lpadding"
Adrien Béraud7b6b20a2016-03-17 19:19:51 -040095 android:layout_marginStart="@dimen/action_button_lpadding"
Adrien Bérauddde513c2015-10-22 11:21:52 -040096 android:adjustViewBounds="false"
97 android:baselineAlignBottom="false"
Adrien Béraud7b6b20a2016-03-17 19:19:51 -040098 android:visibility="gone"
Adrien Bérauddde513c2015-10-22 11:21:52 -040099 app:elevation="6dp"
Adrien Béraudb968c2e2015-11-20 12:08:31 -0500100 app:fabSize="mini"
101 app:pressedTranslationZ="12dp"
Adrien Béraud1347b402016-10-12 16:16:04 -0400102 app:rippleColor="@android:color/white" />
Adrien Béraudb179bab2015-10-08 12:04:22 -0400103
Adrien Bérauddde513c2015-10-22 11:21:52 -0400104 </RelativeLayout>
Adrien Béraud04d822c2015-04-02 17:44:36 -0400105
Adrien Béraud433a8592015-06-17 16:25:44 -0400106 <android.support.design.widget.NavigationView
Adrien Béraud04d822c2015-04-02 17:44:36 -0400107 android:id="@+id/left_drawer"
Adrien Béraud433a8592015-06-17 16:25:44 -0400108 android:layout_width="wrap_content"
Adrien Béraud04d822c2015-04-02 17:44:36 -0400109 android:layout_height="match_parent"
110 android:layout_gravity="start"
Adrien Béraud433a8592015-06-17 16:25:44 -0400111 android:fitsSystemWindows="true"
112 android:theme="@style/AppThemeBase"
113 android:windowBackground="@color/white"
Alexandre Lisionbdb5f472016-11-11 15:59:50 -0500114 app:itemTextColor="?android:textColorPrimary">
115
116 <FrameLayout
117 android:id="@+id/navigation_container"
118 android:layout_width="match_parent"
119 android:layout_height="wrap_content" />
120
121 </android.support.design.widget.NavigationView>
Adrien Béraud04d822c2015-04-02 17:44:36 -0400122
123</android.support.v4.widget.DrawerLayout>