]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Bump the target API to 28.
authorSoren Stoutner <soren@stoutner.com>
Wed, 15 Aug 2018 06:21:19 +0000 (23:21 -0700)
committerSoren Stoutner <soren@stoutner.com>
Wed, 15 Aug 2018 06:21:19 +0000 (23:21 -0700)
app/build.gradle
app/src/main/AndroidManifest.xml
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/res/layout/main_drawerlayout.xml
app/src/main/res/values-es/strings.xml
app/src/main/res/values-it/strings.xml
app/src/main/res/values-ru/strings.xml
app/src/main/res/values-v21/styles.xml [new file with mode: 0644]
app/src/main/res/values/attrs.xml
app/src/main/res/values/styles.xml
app/src/main/res/xml/network_security_config.xml [new file with mode: 0644]

index a98b368d1945966d247b954d38bb498494157074..8710e38df3456954eeac4b876568d227b4559403 100644 (file)
 apply plugin: 'com.android.application'
 
 android {
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 27
-    buildToolsVersion '27.0.3'
+    compileSdkVersion 28
+    buildToolsVersion '28.0.2'
 
     defaultConfig {
         minSdkVersion 19
 
     defaultConfig {
         minSdkVersion 19
-        targetSdkVersion 27
+        targetSdkVersion 28
         versionCode 35
         versionName "2.12"
     }
         versionCode 35
         versionName "2.12"
     }
@@ -71,7 +71,7 @@ android {
 
 dependencies {
     implementation fileTree(include: ['*.jar'], dir: 'libs')
 
 dependencies {
     implementation fileTree(include: ['*.jar'], dir: 'libs')
-    implementation 'com.android.support:design:27.0.2'
+    implementation 'com.android.support:design:28.0.0-rc01'
 
     // Only compile Firebase ads for the free flavor.
     freeImplementation 'com.google.firebase:firebase-ads:15.0.1'
 
     // Only compile Firebase ads for the free flavor.
     freeImplementation 'com.google.firebase:firebase-ads:15.0.1'
index de72063f41e00162ac2946f7119ce981b2fdc259..fc0dc95ac758e41933282783ed5204a4132c9a3d 100644 (file)
@@ -43,7 +43,9 @@
         android:roundIcon="@mipmap/privacy_browser_round"
         android:allowBackup="false"
         android:fullBackupContent="false"
         android:roundIcon="@mipmap/privacy_browser_round"
         android:allowBackup="false"
         android:fullBackupContent="false"
-        android:supportsRtl="true" >
+        android:supportsRtl="true"
+        android:networkSecurityConfig="@xml/network_security_config"
+        tools:ignore="UnusedAttribute" >
 
         <!-- If `android:name="android.webkit.WebView.MetricsOptOut"` is not `true` then `WebViews` will upload metrics to Google.  <https://developer.android.com/reference/android/webkit/WebView.html> -->
         <meta-data
 
         <!-- If `android:name="android.webkit.WebView.MetricsOptOut"` is not `true` then `WebViews` will upload metrics to Google.  <https://developer.android.com/reference/android/webkit/WebView.html> -->
         <meta-data
index cc232311a0a8266977cee1da2fd25934bda19e58..36b855a425028c3d0365ea3bffd3e4afd45c0bb3 100644 (file)
@@ -1545,15 +1545,18 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                     cookieManager.flush();
                 }
 
                     cookieManager.flush();
                 }
 
-                // Reset the Refresh title.
-                refreshMenuItem.setTitle(R.string.refresh);
-
-                // If the icon is displayed in the AppBar, reset it according to the theme.
-                if (displayAdditionalAppBarIcons) {
-                    if (darkTheme) {
-                        refreshMenuItem.setIcon(R.drawable.refresh_enabled_dark);
-                    } else {
-                        refreshMenuItem.setIcon(R.drawable.refresh_enabled_light);
+                // Update the Refresh menu item if it has been created.
+                if (refreshMenuItem != null) {
+                    // Reset the Refresh title.
+                    refreshMenuItem.setTitle(R.string.refresh);
+
+                    // If the icon is displayed in the AppBar, reset it according to the theme.
+                    if (displayAdditionalAppBarIcons) {
+                        if (darkTheme) {
+                            refreshMenuItem.setIcon(R.drawable.refresh_enabled_dark);
+                        } else {
+                            refreshMenuItem.setIcon(R.drawable.refresh_enabled_light);
+                        }
                     }
                 }
 
                     }
                 }
 
index f58017911a47975939a6ec17895ec044c017982b..f87741caa35074450591605956fac070956f7f2a 100644 (file)
@@ -26,7 +26,8 @@
     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>`.
     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 CoordinatorLayout to be `focusableInTouchMode` prevents the URL text box from stealing focus on launch and opening the keyboard. -->
+         Setting the CoordinatorLayout to be `focusableInTouchMode` prevents the URL text box from stealing focus on launch and opening the keyboard.
+         `android:background` sets the background color of the status bar, which is then overlaid with a scrim. -->
     <android.support.design.widget.CoordinatorLayout
         android:id="@+id/root_coordinatorlayout"
         xmlns:tools="http://schemas.android.com/tools"
     <android.support.design.widget.CoordinatorLayout
         android:id="@+id/root_coordinatorlayout"
         xmlns:tools="http://schemas.android.com/tools"
@@ -35,7 +36,8 @@
         android:layout_width="match_parent"
         android:fitsSystemWindows="true"
         android:focusable="true"
         android:layout_width="match_parent"
         android:fitsSystemWindows="true"
         android:focusable="true"
-        android:focusableInTouchMode="true" >
+        android:focusableInTouchMode="true"
+        android:background="?attr/mainStatusBarBackground" >
 
         <!-- The purpose of the `LinearLayout` is to place the included `main_webview` below `app_bar_layout`. -->
         <LinearLayout
 
         <!-- The purpose of the `LinearLayout` is to place the included `main_webview` below `app_bar_layout`. -->
         <LinearLayout
index b2629d0a71c390dd4c42be0bab1ced7cb715ff0b..3a46aebf75e21cdc842a49d5f73c14da3363a92e 100644 (file)
         <string name="privacy_browser_web_page">Página web de Navegador Privado</string>
     <string name="add_to_home_screen">Añadir a la ventana de inicio</string>
     <string name="refresh">Actualizar</string>
         <string name="privacy_browser_web_page">Página web de Navegador Privado</string>
     <string name="add_to_home_screen">Añadir a la ventana de inicio</string>
     <string name="refresh">Actualizar</string>
+    <string name="stop">Parar</string>
 
     <!-- Context Menus. -->
     <string name="load_url">Cargar URL</string>
 
     <!-- Context Menus. -->
     <string name="load_url">Cargar URL</string>
index da628811815bc1f2011912a8b3cc2c63f66899d3..37b1f3ad37fb916801c3d7c257c22f0f5f835d06 100644 (file)
         <string name="privacy_browser_web_page">Pagina web di Privacy Browser</string>
     <string name="add_to_home_screen">Aggiungi collegamento</string>
     <string name="refresh">Aggiorna</string>
         <string name="privacy_browser_web_page">Pagina web di Privacy Browser</string>
     <string name="add_to_home_screen">Aggiungi collegamento</string>
     <string name="refresh">Aggiorna</string>
+    <string name="stop">Stop</string>
 
     <!-- Context Menus. -->
     <string name="load_url">Apri URL</string>
 
     <!-- Context Menus. -->
     <string name="load_url">Apri URL</string>
     <!-- Download Location -->
     <string name="download_location">Cartella di Download</string>
     <string name="download_location_message">Privacy Browser necessita del permesso di accesso alla memoria di storage per utilizzare la cartella pubblica di download.
     <!-- Download Location -->
     <string name="download_location">Cartella di Download</string>
     <string name="download_location_message">Privacy Browser necessita del permesso di accesso alla memoria di storage per utilizzare la cartella pubblica di download.
-        Nel caso in cui il permesso sia negato sarà utilizzata la cartella di download dell'applicazione.</string>
+        Nel caso in cui il permesso sia negato sarà utilizzata la cartella di download dell\'applicazione.</string>
     <string name="ok">OK</string>
 
     <!-- Orbot. -->
     <string name="ok">OK</string>
 
     <!-- Orbot. -->
index b3f7cd3d694e6fa6a1862fc52651deceb9333658..9f0b39904cfd47ab0909cdafaa27609991be6c89 100644 (file)
         <string name="privacy_browser_web_page">Privacy Browser веб-страница</string>
     <string name="add_to_home_screen">Добавить на главный экран</string>
     <string name="refresh">Обновить</string>
         <string name="privacy_browser_web_page">Privacy Browser веб-страница</string>
     <string name="add_to_home_screen">Добавить на главный экран</string>
     <string name="refresh">Обновить</string>
+    <string name="stop">Остановить</string>
 
     <!-- Context Menus. -->
     <string name="load_url">Открыть URL</string>
 
     <!-- Context Menus. -->
     <string name="load_url">Открыть URL</string>
diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml
new file mode 100644 (file)
index 0000000..6854a10
--- /dev/null
@@ -0,0 +1,213 @@
+<?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/>. -->
+
+<resources>
+    <!-- Light theme styles. -->
+
+    <!-- `android:windowTranslucentStatus` makes the system status bar translucent.  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="mainStatusBarBackground">@color/gray_500</item>
+        <item name="android:textColorPrimary">@color/primary_text_color_selector_light</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_800</item>
+        <item name="viewSourceIconTintColor">@color/black</item>
+        <item name="sslHeader">@color/blue_700</item>
+        <item name="sslTitle">@color/blue_900</item>
+        <item name="urlHistoryText">@color/black</item>
+        <item name="redText">@color/red_a700</item>
+        <item name="aboutIcon">@drawable/about_light</item>
+        <item name="dialogTabLayoutTheme">@style/PrivacyBrowserTabLayoutDialogLight</item>
+    </style>
+
+    <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
+    <style name="PrivacyBrowserLight.SecondaryActivity" >
+        <item name="windowActionModeOverlay">true</item>
+        <item name="android:windowTranslucentStatus">false</item>
+        <item name="colorPrimaryDark">@color/blue_700</item>
+        <item name="android:statusBarColor">@color/blue_900</item>
+        <item name="android:textColorHighlight">@color/blue_200</item>
+        <item name="android:actionModeBackground">@color/blue_700</item>
+        <item name="bookmarksSpinnerHeaderTextColor">@color/white</item>
+        <item name="bookmarksSpinnerTextColorSelector">@color/bookmarks_spinner_color_selector_light</item>
+        <item name="bookmarksSpinnerBackground">@color/blue_750</item>
+        <item name="editBookmarkSpinnerTextColorSelector">@color/edit_bookmark_spinner_color_selector_light</item>
+        <item name="requestsSpinnerHeaderTextColor">@color/white</item>
+        <item name="requestsSpinnerTextColorSelector">@color/requests_spinner_color_selector_light</item>
+        <item name="requestsSpinnerBackground">@color/blue_750</item>
+        <item name="listSelectorDrawable">@drawable/list_selector_light</item>
+        <item name="aboutTitle">@color/blue_900</item>
+        <item name="aboutText">@color/blue_700</item>
+        <item name="aboutBackground">@color/white</item>
+        <item name="domainSettingsIconTintColor">@color/blue_800</item>
+        <item name="deleteIcon">@drawable/delete_light</item>
+        <item name="addIcon">@drawable/add_light</item>
+        <item name="addBookmarkIcon">@drawable/create_bookmark_light</item>
+        <item name="addFolderIcon">@drawable/create_folder_light</item>
+        <item name="selectAllIcon">@drawable/select_all_light</item>
+        <item name="editIcon">@drawable/edit_light</item>
+        <item name="moveToFolderIcon">@drawable/move_to_folder_light</item>
+        <item name="actionBarPopupTheme">@style/PrivacyBrowserPopupsLight</item>
+        <item name="appBarTextTheme">@style/PrivacyBrowserAppBarWhiteText</item>
+        <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutLight</item>
+        <item name="popupsTheme">@style/PrivacyBrowserPopupsLight</item>
+    </style>
+
+    <!-- `colorPrimaryDark` is the color of the status bar. -->
+    <style name="PrivacyBrowserSettingsLight" parent="Theme.AppCompat.Light.DarkActionBar" >
+        <item name="colorPrimary">@color/blue_700</item>
+        <item name="colorPrimaryDark">@color/blue_900</item>
+        <item name="colorAccent">@color/blue_700</item>
+        <item name="userAgentIcon">@drawable/user_agent_light</item>
+        <item name="searchIcon">@drawable/search_enabled_light</item>
+        <item name="homepageIcon">@drawable/home_enabled_light</item>
+        <item name="fontSizeIcon">@drawable/font_size_light</item>
+    </style>
+
+    <!-- `ThemeOverlay.AppCompat.ActionBar` makes the hamburger icons dark. -->
+    <style name="PrivacyBrowserAppBarLight" parent="ThemeOverlay.AppCompat.ActionBar" />
+
+    <!-- `ThemeOverlay.AppCompat.Dark.ActionBar` makes the text and the icons in the AppBar white. -->
+    <style name="PrivacyBrowserAppBarWhiteText" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
+
+    <!-- `ThemeOverlay.AppCompat.Light` makes the popups have a light background with dark text. -->
+    <style name="PrivacyBrowserPopupsLight" parent="ThemeOverlay.AppCompat.Light" />
+
+    <!-- Configure the About and Guide `TabLayouts`. -->
+    <style name="PrivacyBrowserTabLayoutLight" parent="Widget.Design.TabLayout" >
+        <item name="android:textColorPrimary">@color/white</item>
+        <item name="android:textColorSecondary">@color/blue_100</item>
+        <item name="tabIndicatorColor">@color/white</item>
+    </style>
+
+    <style name="PrivacyBrowserTabLayoutDialogLight" parent="Widget.Design.TabLayout" >
+        <item name="android:textColorPrimary">@color/blue_700</item>
+        <item name="android:textColorSecondary">@color/blue_700_50</item>
+    </style>
+
+    <style name="PrivacyBrowserAlertDialogLight" parent="Theme.AppCompat.Light.Dialog.Alert" >
+        <item name="colorAccent">@color/blue_700</item>
+    </style>
+
+    <style name="PrivacyBrowserProgressBar" parent="Widget.AppCompat.ProgressBar.Horizontal" >
+        <item name="android:indeterminateDrawable">@android:drawable/progress_horizontal</item>
+    </style>
+
+
+    <!-- Dark theme styles. -->
+
+    <!-- `android:windowTranslucentStatus` makes the system status bar translucent.  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="mainStatusBarBackground">@color/black</item>
+        <item name="android:textColorPrimary">@color/primary_text_color_selector_dark</item>
+        <item name="colorAccent">@color/blue_600</item>
+        <item name="android:textColorHighlight">@color/blue_800</item>
+        <item name="navigationHeaderBackground">@color/blue_800</item>
+        <item name="navigationHeaderTextColor">@color/gray_300</item>
+        <item name="appBarTheme">@style/PrivacyBrowserAppBarDark</item>
+        <item name="progressTintColor">@color/blue_600</item>
+        <item name="navigationIconTintColor">@color/blue_600</item>
+        <item name="findOnPageIconTintColor">@color/blue_600</item>
+        <item name="viewSourceIconTintColor">@color/gray_300</item>
+        <item name="sslHeader">@color/blue_400</item>
+        <item name="sslTitle">@color/blue_700</item>
+        <item name="urlHistoryText">@color/gray_200</item>
+        <item name="redText">@color/red_900</item>
+        <item name="aboutIcon">@drawable/about_dark</item>
+    </style>
+
+    <!-- `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="PrivacyBrowserDark.SecondaryActivity" >
+        <item name="windowActionModeOverlay">true</item>
+        <item name="android:windowTranslucentStatus">false</item>
+        <item name="colorPrimaryDark">@color/blue_800</item>
+        <item name="android:statusBarColor">@color/blue_900</item>
+        <item name="android:actionModeBackground">@color/blue_800</item>
+        <item name="bookmarksSpinnerHeaderTextColor">@color/gray_300</item>
+        <item name="bookmarksSpinnerTextColorSelector">@color/bookmarks_spinner_color_selector_dark</item>
+        <item name="bookmarksSpinnerBackground">@color/blue_830</item>
+        <item name="editBookmarkSpinnerTextColorSelector">@color/edit_bookmark_spinner_color_selector_dark</item>
+        <item name="requestsSpinnerHeaderTextColor">@color/gray_300</item>
+        <item name="requestsSpinnerTextColorSelector">@color/requests_spinner_color_selector_dark</item>
+        <item name="requestsSpinnerBackground">@color/blue_830</item>
+        <item name="aboutTitle">@color/blue_600</item>
+        <item name="aboutText">@color/blue_400</item>
+        <item name="aboutBackground">@color/gray_850</item>
+        <item name="listSelectorDrawable">@drawable/list_selector_dark</item>
+        <item name="domainSettingsIconTintColor">@color/blue_600</item>
+        <item name="deleteIcon">@drawable/delete_dark</item>
+        <item name="addIcon">@drawable/add_dark</item>
+        <item name="addBookmarkIcon">@drawable/create_bookmark_dark</item>
+        <item name="addFolderIcon">@drawable/create_folder_dark</item>
+        <item name="selectAllIcon">@drawable/select_all_dark</item>
+        <item name="editIcon">@drawable/edit_dark</item>
+        <item name="moveToFolderIcon">@drawable/move_to_folder_dark</item>
+        <item name="appBarTextTheme">@style/PrivacyBrowserAppBarDark</item>
+        <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutDark</item>
+        <item name="popupsTheme">@style/PrivacyBrowserPopupsDark</item>
+        <item name="android:spinnerDropDownItemStyle">@style/PrivacyBrowserSpinnerDropDownItemStyleDark</item>
+    </style>
+
+    <style name="PrivacyBrowserSettingsDark" parent="Theme.AppCompat" >
+        <item name="colorPrimary">@color/blue_800</item>
+        <item name="colorPrimaryDark">@color/blue_900</item>
+        <item name="android:textColorPrimary">@color/primary_text_color_selector_dark</item>
+        <item name="colorAccent">@color/blue_600</item>
+        <item name="userAgentIcon">@drawable/user_agent_dark</item>
+        <item name="searchIcon">@drawable/search_enabled_dark</item>
+        <item name="homepageIcon">@drawable/home_enabled_dark</item>
+        <item name="fontSizeIcon">@drawable/font_size_dark</item>
+    </style>
+
+    <!-- `ThemeOverlay.AppCompat.Dark.ActionBar` makes the text and the icons in the AppBar white. -->
+    <style name="PrivacyBrowserAppBarDark" parent="ThemeOverlay.AppCompat.Dark.ActionBar" >
+        <item name="android:textColorPrimary">@color/gray_300</item>
+    </style>
+
+    <!-- Configure the About and Guide `TabLayouts`. -->
+    <style name="PrivacyBrowserTabLayoutDark" parent="Widget.Design.TabLayout" >
+        <item name="tabBackground">@color/blue_800</item>
+        <item name="android:textColorSecondary">@color/blue_300</item>
+        <item name="tabIndicatorColor">@color/gray_300</item>
+    </style>
+
+    <style name="PrivacyBrowserAlertDialogDark" parent="Theme.AppCompat.Dialog.Alert" >
+        <item name="android:windowBackground">@color/gray_850</item>
+        <item name="android:textColorPrimary">@color/gray_300</item>
+        <item name="android:textColorSecondary">@color/gray_300</item>
+        <item name="colorAccent">@color/blue_600</item>
+    </style>
+
+    <style name="PrivacyBrowserSpinnerDropDownItemStyleDark" parent="Base.Widget.AppCompat.TextView.SpinnerItem" >
+        <item name="android:textColor">@color/gray_300</item>
+    </style>
+
+    <!-- `ThemeOverlay.AppCompat.Dark` makes the popups have a dark background with light text. -->
+    <style name="PrivacyBrowserPopupsDark" parent="ThemeOverlay.AppCompat.Dark" >
+        <item name="android:textColorPrimary">@color/primary_text_color_selector_dark</item>
+    </style>
+</resources>
\ No newline at end of file
index 06f63c005eb1b5b6a14c32d55dbb85e39d891ab6..c04bceb587bfbf1c33a46a5819266d6a2276838e 100644 (file)
@@ -25,6 +25,7 @@
     <attr name="tabLayoutTheme" format="reference" />
     <attr name="dialogTabLayoutTheme" format="reference" />
 
     <attr name="tabLayoutTheme" format="reference" />
     <attr name="dialogTabLayoutTheme" format="reference" />
 
+    <attr name="mainStatusBarBackground" format="reference" />
     <attr name="aboutTitle" format="reference" />
     <attr name="aboutText" format="reference" />
     <attr name="aboutBackground" format="reference" />
     <attr name="aboutTitle" format="reference" />
     <attr name="aboutText" format="reference" />
     <attr name="aboutBackground" format="reference" />
index b785fde08ae8be2f3127c50650dc84501aa65663..da59ae58982a03afca027c10bd300f74e5e2555e 100644 (file)
@@ -24,6 +24,7 @@
     <!-- `android:windowTranslucentStatus` makes the system status bar translucent.  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>
     <!-- `android:windowTranslucentStatus` makes the system status bar translucent.  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="mainStatusBarBackground">@color/gray_500</item>
         <item name="android:textColorPrimary">@color/primary_text_color_selector_light</item>
         <item name="colorAccent">@color/blue_700</item>
         <item name="android:textColorHighlight">@color/blue_200</item>
         <item name="android:textColorPrimary">@color/primary_text_color_selector_light</item>
         <item name="colorAccent">@color/blue_700</item>
         <item name="android:textColorHighlight">@color/blue_200</item>
@@ -42,7 +43,7 @@
         <item name="dialogTabLayoutTheme">@style/PrivacyBrowserTabLayoutDialogLight</item>
     </style>
 
         <item name="dialogTabLayoutTheme">@style/PrivacyBrowserTabLayoutDialogLight</item>
     </style>
 
-    <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar.  `colorPrimaryDark` goes behind the status bar, which is then darkened by the overlay.-->
+    <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
     <style name="PrivacyBrowserLight.SecondaryActivity" >
         <item name="windowActionModeOverlay">true</item>
         <item name="colorPrimaryDark">@color/blue_700</item>
     <style name="PrivacyBrowserLight.SecondaryActivity" >
         <item name="windowActionModeOverlay">true</item>
         <item name="colorPrimaryDark">@color/blue_700</item>
     <!-- `android:windowTranslucentStatus` makes the system status bar translucent.  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>
     <!-- `android:windowTranslucentStatus` makes the system status bar translucent.  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="mainStatusBarBackground">@color/black</item>
         <item name="android:textColorPrimary">@color/primary_text_color_selector_dark</item>
         <item name="colorAccent">@color/blue_600</item>
         <item name="android:textColorHighlight">@color/blue_800</item>
         <item name="android:textColorPrimary">@color/primary_text_color_selector_dark</item>
         <item name="colorAccent">@color/blue_600</item>
         <item name="android:textColorHighlight">@color/blue_800</item>
     <!-- `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="PrivacyBrowserDark.SecondaryActivity" >
         <item name="windowActionModeOverlay">true</item>
     <!-- `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="PrivacyBrowserDark.SecondaryActivity" >
         <item name="windowActionModeOverlay">true</item>
-        <item name="colorPrimaryDark">@color/blue_800</item>
+        <item name="colorPrimaryDark">@color/blue_900</item>
         <item name="android:actionModeBackground">@color/blue_800</item>
         <item name="bookmarksSpinnerHeaderTextColor">@color/gray_300</item>
         <item name="bookmarksSpinnerTextColorSelector">@color/bookmarks_spinner_color_selector_dark</item>
         <item name="android:actionModeBackground">@color/blue_800</item>
         <item name="bookmarksSpinnerHeaderTextColor">@color/gray_300</item>
         <item name="bookmarksSpinnerTextColorSelector">@color/bookmarks_spinner_color_selector_dark</item>
diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml
new file mode 100644 (file)
index 0000000..e7ed677
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2018 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/>. -->
+
+<!-- Allow HTTP traffic. -->
+<network-security-config>
+    <base-config cleartextTrafficPermitted="true" />
+</network-security-config>
\ No newline at end of file