1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2015-2017 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 android:id="@+id/drawerlayout"
23 xmlns:android="http://schemas.android.com/apk/res/android"
24 xmlns:app="http://schemas.android.com/apk/res-auto"
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/root_coordinatorlayout"
33 xmlns:tools="http://schemas.android.com/tools"
34 tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
35 android:layout_height="match_parent"
36 android:layout_width="match_parent"
37 android:fitsSystemWindows="true"
38 android:focusable="true"
39 android:focusableInTouchMode="true" >
41 <!-- The purpose of the LinearLayout is to place the included main_webview below appBarLayout. -->
43 android:layout_height="match_parent"
44 android:layout_width="match_parent"
45 android:orientation="vertical" >
47 <android.support.design.widget.AppBarLayout
48 android:id="@+id/app_bar_layout"
49 android:layout_height="wrap_content"
50 android:layout_width="match_parent" >
52 <!-- The `FrameLayout` allows `appBar` and `find_on_page_app_bar` to occupy the same space. -->
54 android:layout_height="wrap_content"
55 android:layout_width="match_parent" >
57 <android.support.v7.widget.Toolbar
58 android:id="@+id/app_bar"
59 android:layout_height="wrap_content"
60 android:layout_width="match_parent" />
62 <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.
63 `android:layout_height="2dp"` works best for API >= 23, but `3dp` is required for visibility on API <= 22.
64 `tools:ignore="UnusedAttribute"` removes the lint waring about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
66 android:id="@+id/progress_bar"
67 style="?android:attr/progressBarStyleHorizontal"
68 android:layout_width="fill_parent"
69 android:layout_height="3dp"
70 android:layout_gravity="bottom"
72 android:progressTint="@color/blue_900"
73 android:progressBackgroundTint="@color/transparent"
74 android:visibility="gone"
75 tools:ignore="UnusedAttribute" />
77 <include layout="@layout/find_on_page_app_bar" />
79 </android.support.design.widget.AppBarLayout>
81 <include layout="@layout/main_webview" />
84 <!-- `full_screen_video_framelayout` is used to display full screen videos. It is initially `android:visibility="gone"` to hide it from view. -->
86 android:id="@+id/full_screen_video_framelayout"
87 android:layout_height="match_parent"
88 android:layout_width="match_parent"
89 android:visibility="gone"
90 android:background="@color/black" />
91 </android.support.design.widget.CoordinatorLayout>
93 <!-- The navigation drawer. -->
94 <android.support.design.widget.NavigationView
95 android:id="@+id/navigationview"
96 android:layout_height="match_parent"
97 android:layout_width="wrap_content"
98 android:layout_gravity="start"
99 app:headerLayout="@layout/navigation_header_dark"
100 app:menu="@menu/webview_navigation_menu"
101 app:itemIconTint="@color/blue_900" />
102 </android.support.v4.widget.DrawerLayout>