1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
6 This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
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.
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.
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/>. -->
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">
28 <!-- android:fitsSystemWindows="true" moves rootCoordinatorLayout below the system status bar.
29 When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>.
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_height="match_parent"
38 android:layout_width="match_parent"
39 android:fitsSystemWindows="true"
40 android:focusable="true"
41 android:focusableInTouchMode="true" >
43 <!-- The purpose of the LinearLayout is to place the included main_webview below appBarLayout. -->
45 android:layout_height="match_parent"
46 android:layout_width="match_parent"
47 android:orientation="vertical" >
49 <android.support.design.widget.AppBarLayout
50 android:id="@+id/appBarLayout"
51 android:layout_height="wrap_content"
52 android:layout_width="match_parent"
53 android:theme="@style/AppBarOverlay" >
55 <!-- The `FrameLayout` allows `appBar` and `find_on_page_app_bar` to occupy the same space. -->
57 android:layout_height="wrap_content"
58 android:layout_width="match_parent" >
60 <android.support.v7.widget.Toolbar
61 android:id="@+id/appBar"
62 android:layout_height="wrap_content"
63 android:layout_width="match_parent"
64 android:background="@color/grey_100"
65 app:popupTheme="@style/LightPopupOverlay" />
67 <include layout="@layout/find_on_page_app_bar" />
69 </android.support.design.widget.AppBarLayout>
71 <include layout="@layout/main_webview" />
73 </android.support.design.widget.CoordinatorLayout>
75 <!-- `fullScreenVideoFrameLayout` is used to display full screen videos. It is initially `android:visibility="gone"` to hide it from view.
76 The `FrameLayout` needs to be before the `NavigationView` or touches on the navigation drawer will not work after exiting full screen video using the back button.-->
78 android:id="@+id/fullScreenVideoFrameLayout"
79 android:layout_height="match_parent"
80 android:layout_width="match_parent"
81 android:visibility="gone"
82 android:background="@color/black" />
84 <!-- The navigation drawer. -->
85 <android.support.design.widget.NavigationView
86 android:id="@+id/navigationView"
87 android:layout_height="match_parent"
88 android:layout_width="wrap_content"
89 android:layout_gravity="start"
90 app:headerLayout="@layout/navigation_header"
91 app:menu="@menu/webview_navigation_menu"
92 app:itemIconTint="@color/blue_800" />
93 </android.support.v4.widget.DrawerLayout>