]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/coordinator_layout.xml
Initial implementation of the navigation drawer.
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / coordinator_layout.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
7
8   Privacy Browser is free software: you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation, either version 3 of the License, or
11   (at your option) any later version.
12
13   Privacy Browser is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18   You should have received a copy of the GNU General Public License
19   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
20
21 <android.support.v4.widget.DrawerLayout
22     xmlns:android="http://schemas.android.com/apk/res/android"
23     xmlns:app="http://schemas.android.com/apk/res-auto"
24     android:id="@+id/drawerLayout"
25     android:layout_height="match_parent"
26     android:layout_width="match_parent">
27
28     <!-- The main content view. -->
29     <!-- android:fitsSystemWindows="true" moves rootCoordinatorLayout below the system status bar. -->
30     <!-- Setting the layout root to be focusableInTouchMode prevents urlTextBox from stealing focus on launch and opening the keyboard. -->
31     <android.support.design.widget.CoordinatorLayout
32         android:id="@+id/rootCoordinatorLayout"
33         xmlns:android="http://schemas.android.com/apk/res/android"
34         xmlns:app="http://schemas.android.com/apk/res-auto"
35         xmlns:tools="http://schemas.android.com/tools"
36         tools:context="com.stoutner.privacybrowser.MainWebViewActivity"
37         android:layout_width="match_parent"
38         android:layout_height="match_parent"
39         android:fitsSystemWindows="true"
40         android:focusable="true"
41         android:focusableInTouchMode="true" >
42
43         <android.support.design.widget.AppBarLayout
44             android:id="@+id/appBarLayout"
45             android:layout_width="match_parent"
46             android:layout_height="wrap_content"
47             android:theme="@style/AppTheme.AppBarOverlay" >
48
49             <android.support.v7.widget.Toolbar
50                 android:id="@+id/appBar"
51                 android:layout_width="match_parent"
52                 android:layout_height="?attr/actionBarSize"
53                 android:background="?attr/colorPrimary"
54                 app:popupTheme="@style/AppTheme.PopupOverlay" />
55         </android.support.design.widget.AppBarLayout>
56
57         <include layout="@layout/main_webview" />
58
59         <!-- fullScreenVideoFrameLayout is used to display full screen videos.  It is initially android:visibility="gone" to hide it from view. -->
60         <FrameLayout
61             android:id="@+id/fullScreenVideoFrameLayout"
62             android:layout_width="match_parent"
63             android:layout_height="match_parent"
64             android:visibility="gone"
65             android:background="@color/black" />
66     </android.support.design.widget.CoordinatorLayout>
67
68     <!-- The navigation drawer. -->
69     <android.support.design.widget.NavigationView
70         android:id="@+id/navigationView"
71         android:layout_width="wrap_content"
72         android:layout_height="match_parent"
73         android:layout_gravity="start"
74         app:headerLayout="@layout/navigation_header"
75         app:menu="@menu/menu_navigation"/>
76
77 </android.support.v4.widget.DrawerLayout>