Refactor style code to use attrs.xml. Create a dark theme for Find on Page.
authorSoren Stoutner <soren@stoutner.com>
Fri, 16 Jun 2017 00:01:07 +0000 (17:01 -0700)
committerSoren Stoutner <soren@stoutner.com>
Fri, 16 Jun 2017 00:01:07 +0000 (17:01 -0700)
25 files changed:
app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/GuideActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/fragments/AboutTabFragment.java
app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java
app/src/main/res/drawable/url_bar_background_transparent.xml [deleted file]
app/src/main/res/layout/about_coordinatorlayout.xml [new file with mode: 0644]
app/src/main/res/layout/about_coordinatorlayout_dark.xml [deleted file]
app/src/main/res/layout/about_coordinatorlayout_light.xml [deleted file]
app/src/main/res/layout/about_tab_version.xml [new file with mode: 0644]
app/src/main/res/layout/about_tab_version_dark.xml [deleted file]
app/src/main/res/layout/about_tab_version_light.xml [deleted file]
app/src/main/res/layout/find_on_page_app_bar.xml
app/src/main/res/layout/guide_coordinatorlayout.xml [new file with mode: 0644]
app/src/main/res/layout/guide_coordinatorlayout_dark.xml [deleted file]
app/src/main/res/layout/guide_coordinatorlayout_light.xml [deleted file]
app/src/main/res/layout/main_drawerlayout.xml [new file with mode: 0644]
app/src/main/res/layout/main_drawerlayout_dark.xml [deleted file]
app/src/main/res/layout/main_drawerlayout_light.xml [deleted file]
app/src/main/res/layout/navigation_header.xml [new file with mode: 0644]
app/src/main/res/layout/navigation_header_dark.xml [deleted file]
app/src/main/res/layout/navigation_header_light.xml [deleted file]
app/src/main/res/values/attrs.xml [new file with mode: 0644]
app/src/main/res/values/strings.xml
app/src/main/res/values/styles.xml

index 8244774e30240a27b87a90865be1b6f278350915..c20452151e9f5c010795593bdd577fdb07384eba 100644 (file)
@@ -45,12 +45,8 @@ public class AboutActivity extends AppCompatActivity {
         // Run the default commands.
         super.onCreate(savedInstanceState);
 
-        // Set the content view according to the theme.
-        if (MainWebViewActivity.darkTheme) {
-            setContentView(R.layout.about_coordinatorlayout_dark);
-        } else {
-            setContentView(R.layout.about_coordinatorlayout_light);
-        }
+        // Set the content view.
+        setContentView(R.layout.about_coordinatorlayout);
 
         // We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21.
         Toolbar aboutAppBar = (Toolbar) findViewById(R.id.about_toolbar);
index a8728fe650746782102fdf4bea573686f7835b99..3bde5a16dfa722951a9e2ffc719f05b3bae32af4 100644 (file)
@@ -45,12 +45,8 @@ public class GuideActivity extends AppCompatActivity {
         // Run the default commands.
         super.onCreate(savedInstanceState);
 
-        // Set the content view according to the theme.
-        if (MainWebViewActivity.darkTheme) {
-            setContentView(R.layout.guide_coordinatorlayout_dark);
-        } else {
-            setContentView(R.layout.guide_coordinatorlayout_light);
-        }
+        // Set the content view.
+        setContentView(R.layout.guide_coordinatorlayout);
 
         // We need to use `SupportActionBar` from `android.support.v7.app.ActionBar` until the minimum API is >= 21.
         Toolbar guideAppBar = (Toolbar) findViewById(R.id.guide_toolbar);
index 0012898ea356cd37134245b33cf059126bee7e09..02f3742f179468bd309cea8788235046733b433a 100644 (file)
@@ -317,12 +317,8 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
         // Run the default commands.
         super.onCreate(savedInstanceState);
 
-        // Set the content view according to the theme.
-        if (darkTheme) {
-            setContentView(R.layout.main_drawerlayout_dark);
-        } else {
-            setContentView(R.layout.main_drawerlayout_light);
-        }
+        // Set the content view.
+        setContentView(R.layout.main_drawerlayout);
 
         // Get a handle for `inputMethodManager`.
         inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
@@ -2525,7 +2521,7 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
                 }
 
                 // Set a transparent background on `urlTextBox`.  We have to use the deprecated `.getDrawable()` until the minimum API >= 21.
-                urlAppBarRelativeLayout.setBackgroundDrawable(getResources().getDrawable(R.drawable.url_bar_background_transparent));
+                urlAppBarRelativeLayout.setBackgroundDrawable(getResources().getDrawable(R.color.transparent));
             }
 
             // Close `domainsDatabaseHelper`.
index ffac619f0e97b9d201df5328fe8bef908e8dcba2..c7d045e7aea0cf68576921b8b1b0eb78c7f6220b 100644 (file)
@@ -77,12 +77,8 @@ public class AboutTabFragment extends Fragment {
 
         // Load the tabs.  Tab numbers start at 0.
         if (tabNumber == 0) {  // Load the about tab.
-            // Inflate the layout according to the theme.  Setting false at the end of inflater.inflate does not attach the inflated layout as a child of container.  The fragment will take care of attaching the root automatically.
-            if (MainWebViewActivity.darkTheme) {
-                tabLayout = inflater.inflate(R.layout.about_tab_version_dark, container, false);
-            } else {
-                tabLayout = inflater.inflate(R.layout.about_tab_version_light, container, false);
-            }
+            // Setting false at the end of inflater.inflate does not attach the inflated layout as a child of container.  The fragment will take care of attaching the root automatically.
+            tabLayout = inflater.inflate(R.layout.about_tab_version, container, false);
 
             // Get handles for the `TextViews`.
             TextView versionNumberTextView = (TextView) tabLayout.findViewById(R.id.about_version_number);
index 14d39bd972a7ef06cbe2c723fbc8ab3326904c16..340e455215f360b96077f4c890d607aab39edd57 100644 (file)
@@ -20,6 +20,7 @@
 package com.stoutner.privacybrowser.fragments;
 
 import android.annotation.SuppressLint;
+import android.content.Intent;
 import android.content.SharedPreferences;
 import android.os.Build;
 import android.os.Bundle;
@@ -792,6 +793,18 @@ public class SettingsFragment extends PreferenceFragment {
                         } else {
                             darkThemePreference.setIcon(R.drawable.theme_light);
                         }
+
+                        // Create an `Intent` to restart Privacy Browser.
+                        Intent intent = getActivity().getParentActivityIntent();
+
+                        // Assert that `intent` is not `null` to remove the lint error below.
+                        assert intent != null;
+
+                        // `Intent.FLAG_ACTIVITY_CLEAR_TASK` removes all activities from the stack.  It requires `Intent.FLAG_ACTIVITY_NEW_TASK`.
+                        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
+
+                        // Make it so.
+                        startActivity(intent);
                         break;
 
                     case "display_webpage_images":
diff --git a/app/src/main/res/drawable/url_bar_background_transparent.xml b/app/src/main/res/drawable/url_bar_background_transparent.xml
deleted file mode 100644 (file)
index ad27b43..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<shape
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle" >
-
-        <solid
-            android:color="@color/transparent" />
-
-        <corners
-            android:radius="10dp" />
-</shape>
\ No newline at end of file
diff --git a/app/src/main/res/layout/about_coordinatorlayout.xml b/app/src/main/res/layout/about_coordinatorlayout.xml
new file mode 100644 (file)
index 0000000..9e43e76
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- android:fitsSystemWindows="true" moves the AppBar below the status bar.
+  When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>
+  to make the status bar a transparent, darkened overlay. -->
+<android.support.design.widget.CoordinatorLayout
+    android:id="@+id/about_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:fitsSystemWindows="true" >
+
+    <!-- The `LinearLayout` with `orientation="vertical"` moves the `ViewPager` below the `AppBarLayout`. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- We need to set `android:background="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be the theme background color. -->
+        <android.support.design.widget.AppBarLayout
+            android:id="@+id/about_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?attr/colorPrimaryDark" >
+
+            <!-- `android:theme="?attr/appBarTextTheme"` sets the color of the text and icons in the `AppBar`. -->
+            <android.support.v7.widget.Toolbar
+                android:id="@+id/about_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:background="?attr/colorPrimaryDark"
+                android:theme="?attr/appBarTextTheme" />
+
+            <!-- For some reason `tabIndicatorColor` does not pull from the style unless specified explicitly here. -->
+            <android.support.design.widget.TabLayout
+                android:id="@+id/about_tablayout"
+                xmlns:android.support.design="http://schemas.android.com/apk/res-auto"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android.support.design:tabMode="scrollable"
+                android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
+                android:theme="?attr/tabLayoutTheme" />
+        </android.support.design.widget.AppBarLayout>
+
+        <!-- `android:layout_weight="1"` makes `about_viewpager` fill the rest of the screen. -->
+        <android.support.v4.view.ViewPager
+            android:id="@+id/about_viewpager"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1" />
+    </LinearLayout>
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/about_coordinatorlayout_dark.xml b/app/src/main/res/layout/about_coordinatorlayout_dark.xml
deleted file mode 100644 (file)
index 2034eaa..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- android:fitsSystemWindows="true" moves the AppBar below the status bar.
-  When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>
-  to make the status bar a transparent, darkened overlay. -->
-<android.support.design.widget.CoordinatorLayout
-    android:id="@+id/about_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent"
-    android:fitsSystemWindows="true" >
-
-    <!-- The `LinearLayout` with `orientation="vertical"` moves the `ViewPager` below the `AppBarLayout`. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- We need to set `android:background="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be black. -->
-        <android.support.design.widget.AppBarLayout
-            android:id="@+id/about_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?attr/colorPrimaryDark" >
-
-            <!-- `android:theme="@style/PrivacyBrowserAppBarDark"` makes the text and icons in the `AppBar` gray. -->
-            <android.support.v7.widget.Toolbar
-                android:id="@+id/about_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:background="?attr/colorPrimaryDark"
-                android:theme="@style/PrivacyBrowserAppBarDark" />
-
-            <!-- For some reason `tabIndicatorColor` does not pull from the style unless specified explicitly here. -->
-            <android.support.design.widget.TabLayout
-                android:id="@+id/about_tablayout"
-                xmlns:android.support.design="http://schemas.android.com/apk/res-auto"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android.support.design:tabMode="scrollable"
-                android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
-                android:theme="@style/PrivacyBrowserTabLayoutDark" />
-        </android.support.design.widget.AppBarLayout>
-
-        <!-- `android:layout_weight="1"` makes `about_viewpager` fill the rest of the screen. -->
-        <android.support.v4.view.ViewPager
-            android:id="@+id/about_viewpager"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1" />
-    </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/about_coordinatorlayout_light.xml b/app/src/main/res/layout/about_coordinatorlayout_light.xml
deleted file mode 100644 (file)
index 0038ed1..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- android:fitsSystemWindows="true" moves the AppBar below the status bar.
-  When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>
-  to make the status bar a transparent, darkened overlay. -->
-<android.support.design.widget.CoordinatorLayout
-    android:id="@+id/about_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent"
-    android:fitsSystemWindows="true" >
-
-    <!-- The `LinearLayout` with `orientation="vertical"` moves the `ViewPager` below the `AppBarLayout`. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- We need to set `android:background="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be white. -->
-        <android.support.design.widget.AppBarLayout
-            android:id="@+id/about_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?attr/colorPrimaryDark" >
-
-            <!-- `android:theme="@style/PrivacyBrowserAppBarWhiteText"` makes the text and icons in the `AppBar` white. -->
-            <android.support.v7.widget.Toolbar
-                android:id="@+id/about_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:background="?attr/colorPrimaryDark"
-                android:theme="@style/PrivacyBrowserAppBarWhiteText" />
-
-            <!-- For some reason `tabIndicatorColor` does not pull from the style unless specified explicitly here. -->
-            <android.support.design.widget.TabLayout
-                android:id="@+id/about_tablayout"
-                xmlns:android.support.design="http://schemas.android.com/apk/res-auto"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android.support.design:tabMode="scrollable"
-                android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
-                android:theme="@style/PrivacyBrowserTabLayoutLight" />
-        </android.support.design.widget.AppBarLayout>
-
-        <!-- `android:layout_weight="1"` makes `about_viewpager` fill the rest of the screen. -->
-        <android.support.v4.view.ViewPager
-            android:id="@+id/about_viewpager"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1" />
-    </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/about_tab_version.xml b/app/src/main/res/layout/about_tab_version.xml
new file mode 100644 (file)
index 0000000..19922b2
--- /dev/null
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- The `ScrollView` allows the `LinearLayout` to scroll if it exceeds the height of the page. -->
+<ScrollView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="wrap_content"
+    android:layout_width="match_parent" >
+
+    <LinearLayout
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        android:padding="16dp" >
+
+        <!-- The `RelativeLayout` contains the header. -->
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" >
+
+            <!-- `tools:ignore="ContentDescription"` suppresses the lint warning about supplying a content description for the `ImageView`,
+                 which isn't needed in this case because the `ImageView` is only decorative. -->
+            <ImageView
+                android:id="@+id/about_version_icon"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:src="@mipmap/privacy_browser"
+                android:paddingTop="10dp"
+                tools:ignore="ContentDescription" />
+
+            <TextView
+                android:id="@+id/about_version_privacy_browser_textview"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/privacy_browser"
+                android:textStyle="bold"
+                android:textSize="22sp"
+                android:textColor="?attr/aboutTitle"
+                android:layout_toEndOf="@id/about_version_icon" />
+
+            <TextView
+                android:id="@+id/about_version_number"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textColor="?attr/aboutText"
+                android:layout_below="@id/about_version_privacy_browser_textview"
+                android:layout_toEndOf="@id/about_version_icon" />
+        </RelativeLayout>
+
+        <!-- The purpose of this `LinearLayout` is to provide padding on the start of the `TextViews` to make them line up with `about_version_icon`.
+             Although we don't need it, we have to include `android:paddingEnd` to make lint happy. -->
+        <LinearLayout
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:orientation="vertical"
+            android:paddingTop="16dp"
+            android:paddingStart="4dp"
+            android:paddingEnd="0dp" >
+
+            <!-- Hardware. -->
+            <TextView
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/hardware"
+                android:textStyle="bold"
+                android:textSize="18sp"
+                android:textColor="?attr/aboutTitle" />
+
+            <TextView
+                android:id="@+id/about_version_brand"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_manufacturer"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_model"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_device"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_bootloader"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_radio"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <!-- Software. -->
+            <TextView
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/software"
+                android:textStyle="bold"
+                android:textSize="18sp"
+                android:textColor="?attr/aboutTitle"
+                android:paddingTop="12dp" />
+
+            <TextView
+                android:id="@+id/about_version_android"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_build"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_securitypatch"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_webkit"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_chrome"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_orbot"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <!-- Package Signature. -->
+            <TextView
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/package_signature"
+                android:textStyle="bold"
+                android:textSize="18sp"
+                android:textColor="?attr/aboutTitle"
+                android:paddingTop="12dp" />
+
+            <TextView
+                android:id="@+id/about_version_certificate_issuer_dn"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_certificate_subject_dn"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_certificate_start_date"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_certificate_end_date"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_certificate_version"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_certificate_serial_number"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+
+            <TextView
+                android:id="@+id/about_version_certificate_signature_algorithm"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content" />
+        </LinearLayout>
+    </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/app/src/main/res/layout/about_tab_version_dark.xml b/app/src/main/res/layout/about_tab_version_dark.xml
deleted file mode 100644 (file)
index f5e206a..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- The `ScrollView` allows the `LinearLayout` to scroll if it exceeds the height of the page. -->
-<ScrollView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_height="wrap_content"
-    android:layout_width="match_parent" >
-
-    <LinearLayout
-        android:layout_height="wrap_content"
-        android:layout_width="match_parent"
-        android:orientation="vertical"
-        android:padding="16dp" >
-
-        <!-- The `RelativeLayout` contains the header. -->
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" >
-
-            <!--`tools:ignore="ContentDescription"` suppresses the lint warning about supplying a content description for the `ImageView`,
-              which isn't needed in this case because the `ImageView` is only decorative. -->
-            <ImageView
-                android:id="@+id/about_version_icon"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:src="@mipmap/privacy_browser"
-                android:paddingTop="10dp"
-                tools:ignore="ContentDescription" />
-
-            <TextView
-                android:id="@+id/about_version_privacy_browser_textview"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/privacy_browser"
-                android:textStyle="bold"
-                android:textSize="22sp"
-                android:textColor="@color/blue_700"
-                android:layout_toEndOf="@id/about_version_icon" />
-
-            <TextView
-                android:id="@+id/about_version_number"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textColor="@color/blue_400"
-                android:layout_below="@id/about_version_privacy_browser_textview"
-                android:layout_toEndOf="@id/about_version_icon" />
-        </RelativeLayout>
-
-        <!-- The purpose of this `LinearLayout` is to provide padding on the start of the `TextViews` to make them line up with `about_version_icon`.
-          Although we don't need it, we have to include `android:paddingEnd` to make lint happy. -->
-        <LinearLayout
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:orientation="vertical"
-            android:paddingTop="16dp"
-            android:paddingStart="4dp"
-            android:paddingEnd="0dp" >
-
-            <!-- Hardware. -->
-            <TextView
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/hardware"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="@color/blue_700" />
-
-            <TextView
-                android:id="@+id/about_version_brand"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_manufacturer"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_model"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_device"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_bootloader"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_radio"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <!-- Software. -->
-            <TextView
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/software"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="@color/blue_700"
-                android:paddingTop="12dp" />
-
-            <TextView
-                android:id="@+id/about_version_android"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_build"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_securitypatch"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_webkit"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_chrome"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_orbot"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <!-- Package Signature. -->
-            <TextView
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/package_signature"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="@color/blue_700"
-                android:paddingTop="12dp" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_issuer_dn"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_subject_dn"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_start_date"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_end_date"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_version"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_serial_number"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_signature_algorithm"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-        </LinearLayout>
-    </LinearLayout>
-</ScrollView>
\ No newline at end of file
diff --git a/app/src/main/res/layout/about_tab_version_light.xml b/app/src/main/res/layout/about_tab_version_light.xml
deleted file mode 100644 (file)
index b64e764..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- The `ScrollView` allows the `LinearLayout` to scroll if it exceeds the height of the page. -->
-<ScrollView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_height="wrap_content"
-    android:layout_width="match_parent" >
-
-    <LinearLayout
-        android:layout_height="wrap_content"
-        android:layout_width="match_parent"
-        android:orientation="vertical"
-        android:padding="16dp" >
-
-        <!-- The `RelativeLayout` contains the header. -->
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" >
-
-            <!--`tools:ignore="ContentDescription"` suppresses the lint warning about supplying a content description for the `ImageView`,
-              which isn't needed in this case because the `ImageView` is only decorative. -->
-            <ImageView
-                android:id="@+id/about_version_icon"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:src="@mipmap/privacy_browser"
-                android:paddingTop="10dp"
-                tools:ignore="ContentDescription" />
-
-            <TextView
-                android:id="@+id/about_version_privacy_browser_textview"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/privacy_browser"
-                android:textStyle="bold"
-                android:textSize="22sp"
-                android:textColor="@color/blue_900"
-                android:layout_toEndOf="@id/about_version_icon" />
-
-            <TextView
-                android:id="@+id/about_version_number"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textColor="@color/blue_700"
-                android:layout_below="@id/about_version_privacy_browser_textview"
-                android:layout_toEndOf="@id/about_version_icon" />
-        </RelativeLayout>
-
-        <!-- The purpose of this `LinearLayout` is to provide padding on the start of the `TextViews` to make them line up with `about_version_icon`.
-          Although we don't need it, we have to include `android:paddingEnd` to make lint happy. -->
-        <LinearLayout
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:orientation="vertical"
-            android:paddingTop="16dp"
-            android:paddingStart="4dp"
-            android:paddingEnd="0dp" >
-
-            <!-- Hardware. -->
-            <TextView
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/hardware"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="@color/blue_900" />
-
-            <TextView
-                android:id="@+id/about_version_brand"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_manufacturer"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_model"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_device"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_bootloader"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_radio"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <!-- Software. -->
-            <TextView
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/software"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="@color/blue_900"
-                android:paddingTop="12dp" />
-
-            <TextView
-                android:id="@+id/about_version_android"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_build"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_securitypatch"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_webkit"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_chrome"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_orbot"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <!-- Package Signature. -->
-            <TextView
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/package_signature"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="@color/blue_900"
-                android:paddingTop="12dp" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_issuer_dn"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_subject_dn"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_start_date"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_end_date"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_version"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_serial_number"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-
-            <TextView
-                android:id="@+id/about_version_certificate_signature_algorithm"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content" />
-        </LinearLayout>
-    </LinearLayout>
-</ScrollView>
\ No newline at end of file
index 30b5ae0a6830295b4fef3f0f11872d921b3fc2cf..d657edcb8ee6d0b49a42060ad5c32d1de4868f70 100644 (file)
@@ -57,8 +57,9 @@
         android:layout_marginStart="4dp"
         android:layout_marginEnd="4dp"
         android:layout_gravity="center_vertical"
+        android:tint="?attr/findOnPageIconTintColor"
         android:contentDescription="@string/previous"
-        android:onClick="findPreviousOnPage"/>
+        android:onClick="findPreviousOnPage" />
 
     <ImageView
         android:id="@+id/find_next"
@@ -68,8 +69,9 @@
         android:layout_marginStart="4dp"
         android:layout_marginEnd="4dp"
         android:layout_gravity="center_vertical"
+        android:tint="?attr/findOnPageIconTintColor"
         android:contentDescription="@string/next"
-        android:onClick="findNextOnPage"/>
+        android:onClick="findNextOnPage" />
 
     <ImageView
         android:id="@+id/close_find"
@@ -79,6 +81,7 @@
         android:layout_marginStart="4dp"
         android:layout_marginEnd="8dp"
         android:layout_gravity="center_vertical"
+        android:tint="?attr/findOnPageIconTintColor"
         android:contentDescription="@string/close"
         android:onClick="closeFindOnPage" />
 </LinearLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/guide_coordinatorlayout.xml b/app/src/main/res/layout/guide_coordinatorlayout.xml
new file mode 100644 (file)
index 0000000..885ec2e
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- android:fitsSystemWindows="true" moves the AppBar below the status bar.
+  When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>
+  to make the status bar a transparent, darkened overlay. -->
+<android.support.design.widget.CoordinatorLayout
+    android:id="@+id/guide_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:fitsSystemWindows="true" >
+
+    <!-- The `LinearLayout` with `orientation="vertical"` moves the `ViewPager` below the `AppBarLayout`. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- We need to set `android:background="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be the theme background color. -->
+        <android.support.design.widget.AppBarLayout
+            android:id="@+id/guide_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?attr/colorPrimaryDark" >
+
+            <!-- `android:theme="?attr/appBarTextTheme"` sets the color of the text and icons in the `AppBar`. -->
+            <android.support.v7.widget.Toolbar
+                android:id="@+id/guide_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:background="?attr/colorPrimaryDark"
+                android:theme="?attr/appBarTextTheme" />
+
+            <!-- For some reason `tabIndicatorColor` does not pull from the style unless specified explicitly here. -->
+            <android.support.design.widget.TabLayout
+                android:id="@+id/guide_tablayout"
+                xmlns:android.support.design="http://schemas.android.com/apk/res-auto"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android.support.design:tabMode="scrollable"
+                android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
+                android:theme="?attr/tabLayoutTheme" />
+        </android.support.design.widget.AppBarLayout>
+
+        <!-- `android:layout_weight="1"` makes `about_viewpager` fill the rest of the screen. -->
+        <android.support.v4.view.ViewPager
+            android:id="@+id/guide_viewpager"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1" />
+    </LinearLayout>
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/guide_coordinatorlayout_dark.xml b/app/src/main/res/layout/guide_coordinatorlayout_dark.xml
deleted file mode 100644 (file)
index 2bb50ad..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- android:fitsSystemWindows="true" moves the AppBar below the status bar.
-  When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>
-  to make the status bar a transparent, darkened overlay. -->
-<android.support.design.widget.CoordinatorLayout
-    android:id="@+id/guide_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent"
-    android:fitsSystemWindows="true" >
-
-    <!-- The `LinearLayout` with `orientation="vertical"` moves the `ViewPager` below the `AppBarLayout`. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- We need to set `android:background="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be black. -->
-        <android.support.design.widget.AppBarLayout
-            android:id="@+id/guide_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?attr/colorPrimaryDark" >
-
-            <!-- `android:theme="@style/PrivacyBrowserAppBarDark"` makes the text and icons in the `AppBar` gray. -->
-            <android.support.v7.widget.Toolbar
-                android:id="@+id/guide_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:background="?attr/colorPrimaryDark"
-                android:theme="@style/PrivacyBrowserAppBarDark" />
-
-            <!-- For some reason `tabIndicatorColor` does not pull from the style unless specified explicitly here. -->
-            <android.support.design.widget.TabLayout
-                android:id="@+id/guide_tablayout"
-                xmlns:android.support.design="http://schemas.android.com/apk/res-auto"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android.support.design:tabMode="scrollable"
-                android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
-                android:theme="@style/PrivacyBrowserTabLayoutDark" />
-        </android.support.design.widget.AppBarLayout>
-
-        <!-- `android:layout_weight="1"` makes `about_viewpager` fill the rest of the screen. -->
-        <android.support.v4.view.ViewPager
-            android:id="@+id/guide_viewpager"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1" />
-    </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/guide_coordinatorlayout_light.xml b/app/src/main/res/layout/guide_coordinatorlayout_light.xml
deleted file mode 100644 (file)
index 506985d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- android:fitsSystemWindows="true" moves the AppBar below the status bar.
-  When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>
-  to make the status bar a transparent, darkened overlay. -->
-<android.support.design.widget.CoordinatorLayout
-    android:id="@+id/guide_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent"
-    android:fitsSystemWindows="true" >
-
-    <!-- The `LinearLayout` with `orientation="vertical"` moves the `ViewPager` below the `AppBarLayout`. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- We need to set `android:background="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be white. -->
-        <android.support.design.widget.AppBarLayout
-            android:id="@+id/guide_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?attr/colorPrimaryDark" >
-
-            <!-- `android:theme="@style/PrivacyBrowserAppBarWhiteText"` makes the text and icons in the `AppBar` white. -->
-            <android.support.v7.widget.Toolbar
-                android:id="@+id/guide_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:background="?attr/colorPrimaryDark"
-                android:theme="@style/PrivacyBrowserAppBarWhiteText" />
-
-            <!-- For some reason `tabIndicatorColor` does not pull from the style unless specified explicitly here. -->
-            <android.support.design.widget.TabLayout
-                android:id="@+id/guide_tablayout"
-                xmlns:android.support.design="http://schemas.android.com/apk/res-auto"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android.support.design:tabMode="scrollable"
-                android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
-                android:theme="@style/PrivacyBrowserTabLayoutLight" />
-        </android.support.design.widget.AppBarLayout>
-
-        <!-- `android:layout_weight="1"` makes `about_viewpager` fill the rest of the screen. -->
-        <android.support.v4.view.ViewPager
-            android:id="@+id/guide_viewpager"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1" />
-    </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/main_drawerlayout.xml b/app/src/main/res/layout/main_drawerlayout.xml
new file mode 100644 (file)
index 0000000..c138a3b
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2015-2017 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<android.support.v4.widget.DrawerLayout
+    android:id="@+id/drawerlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- `android:fitsSystemWindows="true"` moves `root_coordinatorlayout` below the system status bar.
+         When it is specified, the theme should include `<item name="android:windowTranslucentStatus">true</item>`.
+         Setting the layout root to be `focusableInTouchMode` prevents `urlTextBox` from stealing focus on launch and opening the keyboard. -->
+    <android.support.design.widget.CoordinatorLayout
+        android:id="@+id/root_coordinatorlayout"
+        xmlns:tools="http://schemas.android.com/tools"
+        tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:fitsSystemWindows="true"
+        android:focusable="true"
+        android:focusableInTouchMode="true" >
+
+        <!-- The purpose of the `LinearLayout` is to place the included `main_webview` below `app_bar_layout`. -->
+        <LinearLayout
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            android:orientation="vertical" >
+
+            <!-- The `AppBarLayout` theme has to be defined here because the activity uses a `NoActionBar` theme. -->
+            <android.support.design.widget.AppBarLayout
+                android:id="@+id/app_bar_layout"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:theme="@style/PrivacyBrowserAppBarLight" >
+
+                <!-- The `FrameLayout` allows `appBar` and `find_on_page_app_bar` to occupy the same space. -->
+                <FrameLayout
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent" >
+
+                    <android.support.v7.widget.Toolbar
+                        android:id="@+id/app_bar"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent" />
+
+                    <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.
+                        `android:layout_height="2dp"` works best for API >= 23, but `3dp` is required for visibility on API <= 22.
+                        `tools:ignore="UnusedAttribute"` removes the lint waring about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
+                    <ProgressBar
+                        android:id="@+id/progress_bar"
+                        style="?android:attr/progressBarStyleHorizontal"
+                        android:layout_width="fill_parent"
+                        android:layout_height="3dp"
+                        android:layout_gravity="bottom"
+                        android:max="100"
+                        android:progressTint="?attr/progressTintColor"
+                        android:progressBackgroundTint="@color/transparent"
+                        android:visibility="gone"
+                        tools:ignore="UnusedAttribute" />
+
+                    <include layout="@layout/find_on_page_app_bar" />
+                </FrameLayout>
+            </android.support.design.widget.AppBarLayout>
+
+            <include layout="@layout/main_webview" />
+        </LinearLayout>
+
+        <!-- `full_screen_video_framelayout` is used to display full screen videos.  It is initially `android:visibility="gone"` to hide it from view. -->
+        <FrameLayout
+            android:id="@+id/full_screen_video_framelayout"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            android:visibility="gone"
+            android:background="@color/black" />
+    </android.support.design.widget.CoordinatorLayout>
+
+    <!-- The navigation drawer. -->
+    <android.support.design.widget.NavigationView
+        android:id="@+id/navigationview"
+        android:layout_height="match_parent"
+        android:layout_width="wrap_content"
+        android:layout_gravity="start"
+        app:headerLayout="@layout/navigation_header"
+        app:menu="@menu/webview_navigation_menu"
+        app:itemIconTint="?attr/navigationIconTintColor" />
+</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/main_drawerlayout_dark.xml b/app/src/main/res/layout/main_drawerlayout_dark.xml
deleted file mode 100644 (file)
index 54e8bf6..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2015-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<android.support.v4.widget.DrawerLayout
-    android:id="@+id/drawerlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <!-- android:fitsSystemWindows="true" moves rootCoordinatorLayout below the system status bar.
-        When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>.
-        Setting the layout root to be focusableInTouchMode prevents urlTextBox from stealing focus on launch and opening the keyboard. -->
-    <android.support.design.widget.CoordinatorLayout
-        android:id="@+id/root_coordinatorlayout"
-        xmlns:tools="http://schemas.android.com/tools"
-        tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:fitsSystemWindows="true"
-        android:focusable="true"
-        android:focusableInTouchMode="true" >
-
-        <!-- The purpose of the LinearLayout is to place the included main_webview below appBarLayout. -->
-        <LinearLayout
-            android:layout_height="match_parent"
-            android:layout_width="match_parent"
-            android:orientation="vertical" >
-
-            <android.support.design.widget.AppBarLayout
-                android:id="@+id/app_bar_layout"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" >
-
-                <!-- The `FrameLayout` allows `appBar` and `find_on_page_app_bar` to occupy the same space. -->
-                <FrameLayout
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent" >
-
-                    <android.support.v7.widget.Toolbar
-                        android:id="@+id/app_bar"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent" />
-
-                    <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.
-                        `android:layout_height="2dp"` works best for API >= 23, but `3dp` is required for visibility on API <= 22.
-                        `tools:ignore="UnusedAttribute"` removes the lint waring about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
-                    <ProgressBar
-                        android:id="@+id/progress_bar"
-                        style="?android:attr/progressBarStyleHorizontal"
-                        android:layout_width="fill_parent"
-                        android:layout_height="3dp"
-                        android:layout_gravity="bottom"
-                        android:max="100"
-                        android:progressTint="@color/blue_900"
-                        android:progressBackgroundTint="@color/transparent"
-                        android:visibility="gone"
-                        tools:ignore="UnusedAttribute" />
-
-                    <include layout="@layout/find_on_page_app_bar" />
-                </FrameLayout>
-            </android.support.design.widget.AppBarLayout>
-
-            <include layout="@layout/main_webview" />
-        </LinearLayout>
-
-        <!-- `full_screen_video_framelayout` is used to display full screen videos.  It is initially `android:visibility="gone"` to hide it from view. -->
-        <FrameLayout
-            android:id="@+id/full_screen_video_framelayout"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent"
-            android:visibility="gone"
-            android:background="@color/black" />
-    </android.support.design.widget.CoordinatorLayout>
-
-    <!-- The navigation drawer. -->
-    <android.support.design.widget.NavigationView
-        android:id="@+id/navigationview"
-        android:layout_height="match_parent"
-        android:layout_width="wrap_content"
-        android:layout_gravity="start"
-        app:headerLayout="@layout/navigation_header_dark"
-        app:menu="@menu/webview_navigation_menu"
-        app:itemIconTint="@color/blue_900" />
-</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/main_drawerlayout_light.xml b/app/src/main/res/layout/main_drawerlayout_light.xml
deleted file mode 100644 (file)
index 5d48349..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2015-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<android.support.v4.widget.DrawerLayout
-    android:id="@+id/drawerlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <!-- android:fitsSystemWindows="true" moves rootCoordinatorLayout below the system status bar.
-        When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>.
-        Setting the layout root to be focusableInTouchMode prevents urlTextBox from stealing focus on launch and opening the keyboard. -->
-    <android.support.design.widget.CoordinatorLayout
-        android:id="@+id/root_coordinatorlayout"
-        xmlns:tools="http://schemas.android.com/tools"
-        tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:fitsSystemWindows="true"
-        android:focusable="true"
-        android:focusableInTouchMode="true" >
-
-        <!-- The purpose of the LinearLayout is to place the included main_webview below appBarLayout. -->
-        <LinearLayout
-            android:layout_height="match_parent"
-            android:layout_width="match_parent"
-            android:orientation="vertical" >
-
-            <!-- The `AppBarLayout` theme has to be defined here because the activity uses a `NoActionBar` theme. -->
-            <android.support.design.widget.AppBarLayout
-                android:id="@+id/app_bar_layout"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:theme="@style/PrivacyBrowserAppBarLight" >
-
-                <!-- The `FrameLayout` allows `appBar` and `find_on_page_app_bar` to occupy the same space. -->
-                <FrameLayout
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent" >
-
-                    <android.support.v7.widget.Toolbar
-                        android:id="@+id/app_bar"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent" />
-
-                    <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.
-                        `android:layout_height="2dp"` works best for API >= 23, but `3dp` is required for visibility on API <= 22.
-                        `tools:ignore="UnusedAttribute"` removes the lint waring about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
-                    <ProgressBar
-                        android:id="@+id/progress_bar"
-                        style="?android:attr/progressBarStyleHorizontal"
-                        android:layout_width="fill_parent"
-                        android:layout_height="3dp"
-                        android:layout_gravity="bottom"
-                        android:max="100"
-                        android:progressTint="@color/blue_700"
-                        android:progressBackgroundTint="@color/transparent"
-                        android:visibility="gone"
-                        tools:ignore="UnusedAttribute" />
-
-                    <include layout="@layout/find_on_page_app_bar" />
-                </FrameLayout>
-            </android.support.design.widget.AppBarLayout>
-
-            <include layout="@layout/main_webview" />
-        </LinearLayout>
-
-        <!-- `full_screen_video_framelayout` is used to display full screen videos.  It is initially `android:visibility="gone"` to hide it from view. -->
-        <FrameLayout
-            android:id="@+id/full_screen_video_framelayout"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent"
-            android:visibility="gone"
-            android:background="@color/black" />
-    </android.support.design.widget.CoordinatorLayout>
-
-    <!-- The navigation drawer. -->
-    <android.support.design.widget.NavigationView
-        android:id="@+id/navigationview"
-        android:layout_height="match_parent"
-        android:layout_width="wrap_content"
-        android:layout_gravity="start"
-        app:headerLayout="@layout/navigation_header_light"
-        app:menu="@menu/webview_navigation_menu"
-        app:itemIconTint="@color/blue_800" />
-</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/navigation_header.xml b/app/src/main/res/layout/navigation_header.xml
new file mode 100644 (file)
index 0000000..b1229d8
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/navigationText"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:text="@string/navigation"
+    android:paddingTop="35dp"
+    android:paddingBottom="8dp"
+    android:paddingStart="15dp"
+    android:paddingEnd="15dp"
+    android:textStyle="bold"
+    android:textSize="20sp"
+    android:background="?attr/navigationHeaderBackground"
+    android:textColor="?attr/navigationHeaderTextColor" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/navigation_header_dark.xml b/app/src/main/res/layout/navigation_header_dark.xml
deleted file mode 100644 (file)
index ef7de3c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<TextView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/navigationText"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:text="@string/navigation"
-    android:paddingTop="35dp"
-    android:paddingBottom="8dp"
-    android:paddingStart="15dp"
-    android:paddingEnd="15dp"
-    android:textStyle="bold"
-    android:textSize="20sp"
-    android:background="@color/blue_900"
-    android:textColor="@color/gray_300" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/navigation_header_light.xml b/app/src/main/res/layout/navigation_header_light.xml
deleted file mode 100644 (file)
index 3875101..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<TextView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/navigationText"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:text="@string/navigation"
-    android:paddingTop="35dp"
-    android:paddingBottom="8dp"
-    android:paddingStart="15dp"
-    android:paddingEnd="15dp"
-    android:textStyle="bold"
-    android:textSize="20sp"
-    android:background="@color/blue_700"
-    android:textColor="@color/white" />
\ No newline at end of file
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
new file mode 100644 (file)
index 0000000..0529ec5
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<resources>
+    <attr name="appBarTheme" format="reference" />
+    <attr name="appBarTextTheme" format="reference" />
+    <attr name="tabLayoutTheme" format="reference" />
+
+    <attr name="aboutTitle" format="reference" />
+    <attr name="aboutText" format="reference" />
+
+    <attr name="navigationHeaderBackground" format="reference" />
+    <attr name="navigationHeaderTextColor" format="reference" />
+
+    <attr name="progressTintColor" format="reference" />
+    <attr name="navigationIconTintColor" format="reference" />
+
+    <attr name="findOnPageIconTintColor" format="reference" />
+</resources>
\ No newline at end of file
index 6b38aed87c9778c2bcc7b7284177dade1f89a6a4..1c6e1eeae2c00c8bb4a55d1f2b414b8aac4b599d 100644 (file)
         <string name="display_additional_app_bar_icons">Display additional app bar icons</string>
         <string name="display_additional_app_bar_icons_summary">Display icons for toggling cookies, DOM storage, and form data in the app bar if there is room.</string>
         <string name="dark_theme">Dark theme</string>
-        <string name="dark_theme_summary">Privacy Browser must be restarted for the new theme to take effect.</string>
+        <string name="dark_theme_summary">Changing the theme will restart Privacy Browser.</string>
         <string name="display_webpage_images">Display webpage images</string>
         <string name="display_webpage_images_summary">Disable to conserve bandwidth.</string>
 
index b9706c690e481ad48b67216225781100f341baac..8832ee83dafa80ead0628404cb7cb892223faba5 100644 (file)
     <!-- Light theme styles. -->
 
     <!-- `android:windowTranslucentStatus` makes the system status bar translucent.
-        When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
+         When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
     <style name="PrivacyBrowserLight" parent="Theme.AppCompat.Light.NoActionBar" >
         <item name="android:windowTranslucentStatus">true</item>
         <item name="colorAccent">@color/blue_700</item>
         <item name="android:textColorHighlight">@color/blue_200</item>
+        <item name="navigationHeaderBackground">@color/blue_700</item>
+        <item name="navigationHeaderTextColor">@color/white</item>
+        <item name="appBarTheme">@style/PrivacyBrowserAppBarLight</item>
+        <item name="progressTintColor">@color/blue_700</item>
+        <item name="navigationIconTintColor">@color/blue_800</item>
+        <item name="findOnPageIconTintColor">@color/blue_700</item>
     </style>
 
-    <!-- `colorPrimaryDark` goes behind the status bar, which is then darkened by the overlay.
-        `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
+    <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar.
+         `colorPrimaryDark` goes behind the status bar, which is then darkened by the overlay.-->
     <style name="PrivacyBrowserLight.SecondaryActivity" >
+        <item name="windowActionModeOverlay">true</item>
         <item name="colorPrimaryDark">@color/blue_700</item>
         <item name="android:textColorHighlight">@color/blue_200</item>
-        <item name="windowActionModeOverlay">true</item>
         <item name="android:actionModeBackground">@color/blue_700</item>
+        <item name="aboutTitle">@color/blue_900</item>
+        <item name="aboutText">@color/blue_700</item>
         <item name="actionBarPopupTheme">@style/PrivacyBrowserPopupsLight</item>
+        <item name="appBarTextTheme">@style/PrivacyBrowserAppBarWhiteText</item>
+        <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutLight</item>
     </style>
 
     <!-- `colorPrimaryDark` is the color of the status bar. -->
     <!-- Dark theme styles. -->
 
     <!-- `android:windowTranslucentStatus` makes the system status bar translucent.
-        When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
+         When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
     <style name="PrivacyBrowserDark" parent="Theme.AppCompat.NoActionBar" >
         <item name="android:windowTranslucentStatus">true</item>
         <item name="android:textColorPrimary">@color/dark_primary_text_color_selector</item>
         <item name="colorAccent">@color/blue_900</item>
         <item name="android:textColorHighlight">@color/blue_800</item>
+        <item name="navigationHeaderBackground">@color/blue_900</item>
+        <item name="navigationHeaderTextColor">@color/gray_300</item>
+        <item name="appBarTheme">@style/PrivacyBrowserAppBarDark</item>
+        <item name="progressTintColor">@color/blue_800</item>
+        <item name="navigationIconTintColor">@color/blue_900</item>
+        <item name="findOnPageIconTintColor">@color/blue_900</item>
     </style>
 
     <style name="PrivacyBrowserDark.SecondaryActivity" >
         <item name="colorPrimaryDark">@color/blue_900</item>
+        <item name="aboutTitle">@color/blue_700</item>
+        <item name="aboutText">@color/blue_400</item>
+        <item name="appBarTextTheme">@style/PrivacyBrowserAppBarDark</item>
+        <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutDark</item>
     </style>
 
     <!-- `ThemeOverlay.AppCompat.Dark.ActionBar` makes the text and the icons in the AppBar white. -->