]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Create a dark theme for `BookMarksActivity` and `BookmarksDatabaseViewActivity`.
authorSoren Stoutner <soren@stoutner.com>
Wed, 21 Jun 2017 23:37:22 +0000 (16:37 -0700)
committerSoren Stoutner <soren@stoutner.com>
Wed, 21 Jun 2017 23:37:22 +0000 (16:37 -0700)
42 files changed:
app/src/main/AndroidManifest.xml
app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksDatabaseViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/res/drawable/create_folder.xml [deleted file]
app/src/main/res/drawable/create_folder_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/create_folder_light.xml [new file with mode: 0644]
app/src/main/res/drawable/domains_list_selector.xml [deleted file]
app/src/main/res/drawable/domains_list_selector_dark.xml [deleted file]
app/src/main/res/drawable/domains_list_selector_light.xml [deleted file]
app/src/main/res/drawable/edit.xml [deleted file]
app/src/main/res/drawable/edit_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/edit_light.xml [new file with mode: 0644]
app/src/main/res/drawable/list_selector_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/list_selector_light.xml [new file with mode: 0644]
app/src/main/res/drawable/listview_item_background_selector.xml [deleted file]
app/src/main/res/drawable/move_bookmark_down_disabled.xml [deleted file]
app/src/main/res/drawable/move_bookmark_down_enabled.xml [deleted file]
app/src/main/res/drawable/move_bookmark_up_disabled.xml [deleted file]
app/src/main/res/drawable/move_bookmark_up_enabled.xml [deleted file]
app/src/main/res/drawable/move_down_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/move_down_enabled_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/move_down_enabled_light.xml [new file with mode: 0644]
app/src/main/res/drawable/move_to_folder.xml [deleted file]
app/src/main/res/drawable/move_to_folder_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/move_to_folder_light.xml [new file with mode: 0644]
app/src/main/res/drawable/move_up_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/move_up_enabled_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/move_up_enabled_light.xml [new file with mode: 0644]
app/src/main/res/drawable/select_all.xml [deleted file]
app/src/main/res/drawable/select_all_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/select_all_light.xml [new file with mode: 0644]
app/src/main/res/layout/bookmarks_coordinatorlayout.xml
app/src/main/res/layout/bookmarks_database_view_coordinatorlayout.xml
app/src/main/res/layout/bookmarks_database_view_item_linearlayout.xml
app/src/main/res/layout/bookmarks_item_linearlayout.xml
app/src/main/res/layout/domain_name_linearlayout.xml
app/src/main/res/layout/move_to_folder_item_linearlayout.xml
app/src/main/res/menu/bookmarks_context_menu.xml
app/src/main/res/menu/bookmarks_options_menu.xml
app/src/main/res/values/attrs.xml
app/src/main/res/values/styles.xml

index 004984e5468a7a314cd684c0e16769d6878a9752..be16084ba18ef49814ccc73697357d451fdf8cb4 100644 (file)
@@ -84,7 +84,6 @@
         <activity
             android:name=".activities.BookmarksActivity"
             android:label="@string/bookmarks"
-            android:theme="@style/PrivacyBrowserLight.SecondaryActivity"
             android:parentActivityName=".activities.MainWebViewActivity"
             android:configChanges="orientation|screenSize"
             android:screenOrientation="fullUser"
@@ -97,7 +96,6 @@
         <activity
             android:name=".activities.BookmarksDatabaseViewActivity"
             android:label="@string/bookmarks_database_view"
-            android:theme="@style/PrivacyBrowserLight.SecondaryActivity"
             android:parentActivityName=".activities.BookmarksActivity"
             android:configChanges="orientation|screenSize"
             android:screenOrientation="fullUser"
index 8775cc2010fe0b9d8b516b328fc8fa57e28198c1..cdd9049813c3bd9c6ec4665cc244057450b37e54 100644 (file)
@@ -97,7 +97,17 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
+        // Set the activity theme.
+        if (MainWebViewActivity.darkTheme) {
+            setTheme(R.style.PrivacyBrowserDark_SecondaryActivity);
+        } else {
+            setTheme(R.style.PrivacyBrowserLight_SecondaryActivity);
+        }
+
+        // Run the default commands.
         super.onCreate(savedInstanceState);
+
+        // Set the content view.
         setContentView(R.layout.bookmarks_coordinatorlayout);
 
         // We need to use the `SupportActionBar` from `android.support.v7.app.ActionBar` until the minimum API is >= 21.
@@ -185,7 +195,7 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
                 editBookmarkMenuItem = menu.findItem(R.id.edit_bookmark);
                 selectAllBookmarksMenuItem = menu.findItem(R.id.context_menu_select_all_bookmarks);
 
-                // Get a handle for `contextualActionMode` so we can close it programatically.
+                // Store `contextualActionMode` so we can close it programatically.
                 contextualActionMode = mode;
 
                 return true;
@@ -225,19 +235,31 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
                     // Disable `moveBookmarkUpMenuItem` if the selected bookmark is at the top of the ListView.
                     if (selectedBookmarkDatabaseId == firstBookmarkDatabaseId) {
                         moveBookmarkUpMenuItem.setEnabled(false);
-                        moveBookmarkUpMenuItem.setIcon(R.drawable.move_bookmark_up_disabled);
+                        moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_disabled);
                     } else {  // Otherwise enable `moveBookmarkUpMenuItem`.
                         moveBookmarkUpMenuItem.setEnabled(true);
-                        moveBookmarkUpMenuItem.setIcon(R.drawable.move_bookmark_up_enabled);
+
+                        // Set the icon according to the theme.
+                        if (MainWebViewActivity.darkTheme) {
+                            moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_enabled_dark);
+                        } else {
+                            moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_enabled_light);
+                        }
                     }
 
                     // Disable `moveBookmarkDownMenuItem` if the selected bookmark is at the bottom of the ListView.
                     if (selectedBookmarkDatabaseId == lastBookmarkDatabaseId) {
                         moveBookmarkDownMenuItem.setEnabled(false);
-                        moveBookmarkDownMenuItem.setIcon(R.drawable.move_bookmark_down_disabled);
+                        moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_disabled);
                     } else {  // Otherwise enable `moveBookmarkDownMenuItem`.
                         moveBookmarkDownMenuItem.setEnabled(true);
-                        moveBookmarkDownMenuItem.setIcon(R.drawable.move_bookmark_down_enabled);
+
+                        // Set the icon according to the theme.
+                        if (MainWebViewActivity.darkTheme) {
+                            moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_enabled_dark);
+                        } else {
+                            moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_enabled_light);
+                        }
                     }
                 } else {  // More than one bookmark is selected.
                     // List the number of selected bookmarks in the subtitle.
index c996a677de2c6fcaada3ae0e584f82b30c6aae34..53fb657d4cebe31d25cf67027635ebe4a7e9a132 100644 (file)
@@ -48,6 +48,13 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity {
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
+        // Set the activity theme.
+        if (MainWebViewActivity.darkTheme) {
+            setTheme(R.style.PrivacyBrowserDark_SecondaryActivity);
+        } else {
+            setTheme(R.style.PrivacyBrowserLight_SecondaryActivity);
+        }
+
         super.onCreate(savedInstanceState);
         setContentView(R.layout.bookmarks_database_view_coordinatorlayout);
 
@@ -129,7 +136,13 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity {
                 } else {
                     parentFolderImageView.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), R.drawable.folder_dark_blue));
                     bookmarkParentFolderTextView.setText(bookmarkParentFolder);
-                    bookmarkParentFolderTextView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.black));
+
+                    // Set the text color according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        bookmarkParentFolderTextView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.gray_300));
+                    } else {
+                        bookmarkParentFolderTextView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.black));
+                    }
                 }
 
                 // Get the bookmark URL form the `Cursor` and display it in `bookmarkUrlTextView`.
index 24acf91685d318f0d673776dcba907c5ea5cbd9a..6db0595a5caadf6bcdcad8fc786bc0879191d54b 100644 (file)
@@ -122,9 +122,9 @@ import java.util.Set;
 public class MainWebViewActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, CreateHomeScreenShortcutDialog.CreateHomeScreenSchortcutListener,
         SslCertificateErrorDialog.SslCertificateErrorListener, DownloadFileDialog.DownloadFileListener, DownloadImageDialog.DownloadImageListener, UrlHistoryDialog.UrlHistoryListener {
 
-    // `darkTheme` is public static so it can be accessed from `AboutActivity`, `GuideActivity`, `AddDomainDialog`, `SettingsActivity`, `DomainsActivity`, `DomainsSettingsActivity`, `CreateBookmarkDialog`, `CreateBookmarkFolderDialog`,
-    // `DownloadFileDialog`, `DownloadImageDialog`, `EditBookmarkDialog`, `EditBookmarkFolderDialog`, `MoveToFolderDialog`, `SslCertificateErrorDialog`, `UrlHistoryDialog`, `ViewSslCertificateDialog`, `CreateHomeScreenShortcutDialog`, and `OrbotProxyHelper`.
-    // It is also used in `onCreate()`, `applyAppSettings()`, `applyDomainSettings()`, and `updatePrivacyIcons()`.
+    // `darkTheme` is public static so it can be accessed from `AboutActivity`, `GuideActivity`, `AddDomainDialog`, `SettingsActivity`, `DomainsActivity`, `DomainsSettingsActivity`, `BookmarksActivity`, `BookmarksDatabaseViewActivity`,
+    // `CreateBookmarkDialog`, `CreateBookmarkFolderDialog`, `DownloadFileDialog`, `DownloadImageDialog`, `EditBookmarkDialog`, `EditBookmarkFolderDialog`, `MoveToFolderDialog`, `SslCertificateErrorDialog`, `UrlHistoryDialog`, `ViewSslCertificateDialog`,
+    // `CreateHomeScreenShortcutDialog`, and `OrbotProxyHelper`. It is also used in `onCreate()`, `applyAppSettings()`, `applyDomainSettings()`, and `updatePrivacyIcons()`.
     public static boolean darkTheme;
 
     // `favoriteIconBitmap` is public static so it can be accessed from `CreateHomeScreenShortcutDialog`, `BookmarksActivity`, `CreateBookmarkDialog`, `CreateBookmarkFolderDialog`, `EditBookmarkDialog`, `EditBookmarkFolderDialog`, `ViewSslCertificateDialog`.
diff --git a/app/src/main/res/drawable/create_folder.xml b/app/src/main/res/drawable/create_folder.xml
deleted file mode 100644 (file)
index 78c67f2..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- `create_folder.xml` comes from the Android Material icon set, where it is called `ic_create_new_folder`.  It is released under the Apache License 2.0. -->
-
-<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24.0"
-    android:viewportWidth="24.0"
-    android:autoMirrored="true"
-    tools:ignore="VectorRaster" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M20,6h-8l-2,-2L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM19,14h-3v3h-2v-3h-3v-2h3L14,9h2v3h3v2z"/>
-</vector>
diff --git a/app/src/main/res/drawable/create_folder_dark.xml b/app/src/main/res/drawable/create_folder_dark.xml
new file mode 100644 (file)
index 0000000..b3f351e
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- `create_folder_dark.xml` comes from the Android Material icon set, where it is called `ic_create_new_folder`.  It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0"
+    android:autoMirrored="true"
+    tools:ignore="VectorRaster" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFE0E0E0"
+        android:pathData="M20,6h-8l-2,-2L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM19,14h-3v3h-2v-3h-3v-2h3L14,9h2v3h3v2z"/>
+</vector>
diff --git a/app/src/main/res/drawable/create_folder_light.xml b/app/src/main/res/drawable/create_folder_light.xml
new file mode 100644 (file)
index 0000000..6799516
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- `create_folder_light.xml` comes from the Android Material icon set, where it is called `ic_create_new_folder`.  It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0"
+    android:autoMirrored="true"
+    tools:ignore="VectorRaster" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M20,6h-8l-2,-2L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM19,14h-3v3h-2v-3h-3v-2h3L14,9h2v3h3v2z"/>
+</vector>
diff --git a/app/src/main/res/drawable/domains_list_selector.xml b/app/src/main/res/drawable/domains_list_selector.xml
deleted file mode 100644 (file)
index 904cf99..0000000
+++ /dev/null
@@ -1,26 +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/>. -->
-
-<!-- This selector changes the background of activated items in the domains `ListView`. -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:state_activated="true"
-        android:drawable="@color/blue_200" />
-</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/domains_list_selector_dark.xml b/app/src/main/res/drawable/domains_list_selector_dark.xml
deleted file mode 100644 (file)
index da370c9..0000000
+++ /dev/null
@@ -1,26 +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/>. -->
-
-<!-- This selector changes the background of activated items in the domains `ListView`. -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:state_activated="true"
-        android:drawable="@color/blue_700" />
-</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/domains_list_selector_light.xml b/app/src/main/res/drawable/domains_list_selector_light.xml
deleted file mode 100644 (file)
index 904cf99..0000000
+++ /dev/null
@@ -1,26 +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/>. -->
-
-<!-- This selector changes the background of activated items in the domains `ListView`. -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:state_activated="true"
-        android:drawable="@color/blue_200" />
-</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/edit.xml b/app/src/main/res/drawable/edit.xml
deleted file mode 100644 (file)
index 9332021..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- `edit.xml` comes from the Android Material icon set, where it is called `ic_edit`.  It is released under the Apache License 2.0. -->
-
-<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24.0"
-    android:viewportWidth="24.0"
-    android:autoMirrored="true"
-    tools:ignore="VectorRaster" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
-</vector>
diff --git a/app/src/main/res/drawable/edit_dark.xml b/app/src/main/res/drawable/edit_dark.xml
new file mode 100644 (file)
index 0000000..7fec007
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- `edit_dark.xml` comes from the Android Material icon set, where it is called `ic_edit`.  It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0"
+    android:autoMirrored="true"
+    tools:ignore="VectorRaster" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFE0E0E0"
+        android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
+</vector>
diff --git a/app/src/main/res/drawable/edit_light.xml b/app/src/main/res/drawable/edit_light.xml
new file mode 100644 (file)
index 0000000..97ea7d9
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- `edit_light.xml` comes from the Android Material icon set, where it is called `ic_edit`.  It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0"
+    android:autoMirrored="true"
+    tools:ignore="VectorRaster" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
+</vector>
diff --git a/app/src/main/res/drawable/list_selector_dark.xml b/app/src/main/res/drawable/list_selector_dark.xml
new file mode 100644 (file)
index 0000000..7f4f195
--- /dev/null
@@ -0,0 +1,26 @@
+<?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/>. -->
+
+<!-- This selector changes the background of activated items in a `ListView`. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item
+        android:state_activated="true"
+        android:drawable="@color/blue_700" />
+</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/list_selector_light.xml b/app/src/main/res/drawable/list_selector_light.xml
new file mode 100644 (file)
index 0000000..fef52c5
--- /dev/null
@@ -0,0 +1,26 @@
+<?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/>. -->
+
+<!-- This selector changes the background of activated items in a `ListView`. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item
+        android:state_activated="true"
+        android:drawable="@color/blue_200" />
+</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/listview_item_background_selector.xml b/app/src/main/res/drawable/listview_item_background_selector.xml
deleted file mode 100644 (file)
index 7720aca..0000000
+++ /dev/null
@@ -1,26 +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/>. -->
-
-<!-- This selector changes the background of activated items in the bookmarks `ListView`. -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:state_activated="true"
-        android:drawable="@color/blue_100" />
-</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/move_bookmark_down_disabled.xml b/app/src/main/res/drawable/move_bookmark_down_disabled.xml
deleted file mode 100644 (file)
index 4148b5e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `move_bookmark_down_disabled.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_bottom`.  It is released under the Apache License 2.0. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FFBBDEFB"
-        android:pathData="M16,13h-3V3h-2v10H8l4,4 4,-4zM4,19v2h16v-2H4z"/>
-</vector>
diff --git a/app/src/main/res/drawable/move_bookmark_down_enabled.xml b/app/src/main/res/drawable/move_bookmark_down_enabled.xml
deleted file mode 100644 (file)
index dc9806d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `move_bookmark_down_enabled.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_bottom`.  It is released under the Apache License 2.0. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M16,13h-3V3h-2v10H8l4,4 4,-4zM4,19v2h16v-2H4z"/>
-</vector>
diff --git a/app/src/main/res/drawable/move_bookmark_up_disabled.xml b/app/src/main/res/drawable/move_bookmark_up_disabled.xml
deleted file mode 100644 (file)
index 2085182..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `move_bookmark_up_disabled.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_top`.  It is released under the Apache License 2.0. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FFBBDEFB"
-        android:pathData="M8,11h3v10h2V11h3l-4,-4 -4,4zM4,3v2h16V3H4z"/>
-</vector>
diff --git a/app/src/main/res/drawable/move_bookmark_up_enabled.xml b/app/src/main/res/drawable/move_bookmark_up_enabled.xml
deleted file mode 100644 (file)
index c0d2986..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `move_bookmark_up_enabled.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_top`.  It is released under the Apache License 2.0. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M8,11h3v10h2V11h3l-4,-4 -4,4zM4,3v2h16V3H4z"/>
-</vector>
diff --git a/app/src/main/res/drawable/move_down_disabled.xml b/app/src/main/res/drawable/move_down_disabled.xml
new file mode 100644 (file)
index 0000000..10bc6b8
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `move_down_disabled.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_bottom`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFBBDEFB"
+        android:pathData="M16,13h-3V3h-2v10H8l4,4 4,-4zM4,19v2h16v-2H4z"/>
+</vector>
diff --git a/app/src/main/res/drawable/move_down_enabled_dark.xml b/app/src/main/res/drawable/move_down_enabled_dark.xml
new file mode 100644 (file)
index 0000000..88d04f4
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `move_down_enabled_light.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_bottom`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFE0E0E0"
+        android:pathData="M16,13h-3V3h-2v10H8l4,4 4,-4zM4,19v2h16v-2H4z"/>
+</vector>
diff --git a/app/src/main/res/drawable/move_down_enabled_light.xml b/app/src/main/res/drawable/move_down_enabled_light.xml
new file mode 100644 (file)
index 0000000..0cb9fc3
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `move_down_enabled_light.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_bottom`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M16,13h-3V3h-2v10H8l4,4 4,-4zM4,19v2h16v-2H4z"/>
+</vector>
diff --git a/app/src/main/res/drawable/move_to_folder.xml b/app/src/main/res/drawable/move_to_folder.xml
deleted file mode 100644 (file)
index 410ad13..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- `move_to_folder.xml` comes from the Android Material icon set, where it is called `ic_folder_special`.  It is released under the Apache License 2.0. -->
-
-<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24.0"
-    android:viewportWidth="24.0"
-    android:autoMirrored="true"
-    tools:ignore="VectorRaster" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M20,6h-8l-2,-2L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM17.94,17L15,15.28 12.06,17l0.78,-3.33 -2.59,-2.24 3.41,-0.29L15,8l1.34,3.14 3.41,0.29 -2.59,2.24 0.78,3.33z"/>
-</vector>
diff --git a/app/src/main/res/drawable/move_to_folder_dark.xml b/app/src/main/res/drawable/move_to_folder_dark.xml
new file mode 100644 (file)
index 0000000..16dc955
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- `move_to_folder_dark.xml` comes from the Android Material icon set, where it is called `ic_folder_special`.  It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0"
+    android:autoMirrored="true"
+    tools:ignore="VectorRaster" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFE0E0E0"
+        android:pathData="M20,6h-8l-2,-2L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM17.94,17L15,15.28 12.06,17l0.78,-3.33 -2.59,-2.24 3.41,-0.29L15,8l1.34,3.14 3.41,0.29 -2.59,2.24 0.78,3.33z"/>
+</vector>
diff --git a/app/src/main/res/drawable/move_to_folder_light.xml b/app/src/main/res/drawable/move_to_folder_light.xml
new file mode 100644 (file)
index 0000000..92e9b19
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- `move_to_folder_light.xml` comes from the Android Material icon set, where it is called `ic_folder_special`.  It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0"
+    android:autoMirrored="true"
+    tools:ignore="VectorRaster" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M20,6h-8l-2,-2L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM17.94,17L15,15.28 12.06,17l0.78,-3.33 -2.59,-2.24 3.41,-0.29L15,8l1.34,3.14 3.41,0.29 -2.59,2.24 0.78,3.33z"/>
+</vector>
diff --git a/app/src/main/res/drawable/move_up_disabled.xml b/app/src/main/res/drawable/move_up_disabled.xml
new file mode 100644 (file)
index 0000000..6c93570
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `move_up_disabled.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_top`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFBBDEFB"
+        android:pathData="M8,11h3v10h2V11h3l-4,-4 -4,4zM4,3v2h16V3H4z"/>
+</vector>
diff --git a/app/src/main/res/drawable/move_up_enabled_dark.xml b/app/src/main/res/drawable/move_up_enabled_dark.xml
new file mode 100644 (file)
index 0000000..c232a59
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `move_up_enabled_dark.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_top`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFE0E0E0"
+        android:pathData="M8,11h3v10h2V11h3l-4,-4 -4,4zM4,3v2h16V3H4z"/>
+</vector>
diff --git a/app/src/main/res/drawable/move_up_enabled_light.xml b/app/src/main/res/drawable/move_up_enabled_light.xml
new file mode 100644 (file)
index 0000000..3fb4e53
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `move_up_enabled_light.xml` comes from the Android Material icon set, where it is called `ic_vertical_align_top`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M8,11h3v10h2V11h3l-4,-4 -4,4zM4,3v2h16V3H4z"/>
+</vector>
diff --git a/app/src/main/res/drawable/select_all.xml b/app/src/main/res/drawable/select_all.xml
deleted file mode 100644 (file)
index 54151e5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `select_all.xml` comes from the Android Material icon set, where it is called `ic_select_all`.  It is released under the Apache License 2.0. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M3,5h2L5,3c-1.1,0 -2,0.9 -2,2zM3,13h2v-2L3,11v2zM7,21h2v-2L7,19v2zM3,9h2L5,7L3,7v2zM13,3h-2v2h2L13,3zM19,3v2h2c0,-1.1 -0.9,-2 -2,-2zM5,21v-2L3,19c0,1.1 0.9,2 2,2zM3,17h2v-2L3,15v2zM9,3L7,3v2h2L9,3zM11,21h2v-2h-2v2zM19,13h2v-2h-2v2zM19,21c1.1,0 2,-0.9 2,-2h-2v2zM19,9h2L21,7h-2v2zM19,17h2v-2h-2v2zM15,21h2v-2h-2v2zM15,5h2L17,3h-2v2zM7,17h10L17,7L7,7v10zM9,9h6v6L9,15L9,9z"/>
-</vector>
diff --git a/app/src/main/res/drawable/select_all_dark.xml b/app/src/main/res/drawable/select_all_dark.xml
new file mode 100644 (file)
index 0000000..c0099cc
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `select_all_dark.xml` comes from the Android Material icon set, where it is called `ic_select_all`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFE0E0E0"
+        android:pathData="M3,5h2L5,3c-1.1,0 -2,0.9 -2,2zM3,13h2v-2L3,11v2zM7,21h2v-2L7,19v2zM3,9h2L5,7L3,7v2zM13,3h-2v2h2L13,3zM19,3v2h2c0,-1.1 -0.9,-2 -2,-2zM5,21v-2L3,19c0,1.1 0.9,2 2,2zM3,17h2v-2L3,15v2zM9,3L7,3v2h2L9,3zM11,21h2v-2h-2v2zM19,13h2v-2h-2v2zM19,21c1.1,0 2,-0.9 2,-2h-2v2zM19,9h2L21,7h-2v2zM19,17h2v-2h-2v2zM15,21h2v-2h-2v2zM15,5h2L17,3h-2v2zM7,17h10L17,7L7,7v10zM9,9h6v6L9,15L9,9z"/>
+</vector>
diff --git a/app/src/main/res/drawable/select_all_light.xml b/app/src/main/res/drawable/select_all_light.xml
new file mode 100644 (file)
index 0000000..b9bf3e1
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `select_all_light.xml` comes from the Android Material icon set, where it is called `ic_select_all`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
+
+    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M3,5h2L5,3c-1.1,0 -2,0.9 -2,2zM3,13h2v-2L3,11v2zM7,21h2v-2L7,19v2zM3,9h2L5,7L3,7v2zM13,3h-2v2h2L13,3zM19,3v2h2c0,-1.1 -0.9,-2 -2,-2zM5,21v-2L3,19c0,1.1 0.9,2 2,2zM3,17h2v-2L3,15v2zM9,3L7,3v2h2L9,3zM11,21h2v-2h-2v2zM19,13h2v-2h-2v2zM19,21c1.1,0 2,-0.9 2,-2h-2v2zM19,9h2L21,7h-2v2zM19,17h2v-2h-2v2zM15,21h2v-2h-2v2zM15,5h2L17,3h-2v2zM7,17h10L17,7L7,7v10zM9,9h6v6L9,15L9,9z"/>
+</vector>
index 3eb252739d39865bcc691424f61fb8c8340f7d6b..e07ce174955ee960ca8442f7c91209594f374dbe 100644 (file)
@@ -18,8 +18,7 @@
   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: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/bookmarks_coordinatorlayout"
     xmlns:android="http://schemas.android.com/apk/res/android"
         <android.support.design.widget.AppBarLayout
             android:id="@+id/bookmarks_appbarlayout"
             android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:theme="@style/PrivacyBrowserAppBarLight" >
+            android:layout_width="match_parent" >
 
             <!-- android:theme="@style/PrivacyBrowser.DarkAppBar" makes the text and icons in the AppBar white. -->
             <android.support.v7.widget.Toolbar
                 android:id="@+id/bookmarks_toolbar"
                 android:layout_height="wrap_content"
                 android:layout_width="match_parent"
-                android:background="@color/blue_700"
-                android:theme="@style/PrivacyBrowserAppBarWhiteText"
-                app:popupTheme="@style/PrivacyBrowserPopupsLight" />
+                android:background="?attr/colorPrimaryDark"
+                android:theme="?attr/appBarTextTheme"
+                app:popupTheme="?attr/popupsTheme" />
         </android.support.design.widget.AppBarLayout>
 
         <!-- `android:choiceMode="multipleChoiceModal"` allows the contextual action menu to select more than one item at a time.
@@ -57,7 +55,7 @@
             android:layout_height="match_parent"
             android:layout_width="match_parent"
             android:choiceMode="multipleChoiceModal"
-            android:divider="@color/white"
+            android:divider="@color/transparent"
             android:dividerHeight="0dp" />
     </LinearLayout>
 
index b480d096454246b8eef58259d5420ea0d1535bdb..d81c02d37c9f8786d8ad040fc51a010370f9b5a0 100644 (file)
@@ -24,7 +24,6 @@
 <android.support.design.widget.CoordinatorLayout
     android:id="@+id/bookmarks_database_view_coordinatorlayout"
     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" >
         <android.support.design.widget.AppBarLayout
             android:id="@+id/bookmarks_database_view_appbarlayout"
             android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:theme="@style/PrivacyBrowserAppBarLight" >
+            android:layout_width="match_parent" >
 
             <android.support.v7.widget.Toolbar
                 android:id="@+id/bookmarks_database_view_toolbar"
                 android:layout_height="wrap_content"
                 android:layout_width="match_parent"
-                android:background="@color/blue_700"
-                android:theme="@style/PrivacyBrowserAppBarWhiteText"
-                app:popupTheme="@style/PrivacyBrowserPopupsLight" />
+                android:background="?attr/colorPrimaryDark"
+                android:theme="?attr/appBarTextTheme" />
         </android.support.design.widget.AppBarLayout>
 
         <ListView
index 07f45a99de3cea7c21f36735ec8ca7ce46cb27a6..c5f3fa248271bf28295b2a732dc4331dd4b167ee 100644 (file)
@@ -56,7 +56,7 @@
             android:id='@+id/bookmarks_database_view_bookmark_name'
             android:layout_height="wrap_content"
             android:layout_width="wrap_content"
-            android:textColor="@color/black"
+            android:textColor="?android:attr/textColorPrimary"
             android:textSize="22sp"
             android:maxLines="1" />
     </LinearLayout>
@@ -75,7 +75,7 @@
             android:layout_width="50dp"
             android:layout_marginEnd="10dp"
             android:gravity="end"
-            android:textColor="@color/black"
+            android:textColor="?android:attr/textColorPrimary"
             android:textSize="22sp" />
 
         <ImageView
@@ -91,7 +91,6 @@
             android:id="@+id/bookmarks_database_view_parent_folder"
             android:layout_height="wrap_content"
             android:layout_width="wrap_content"
-            android:textColor="@color/black"
             android:textSize="22sp"
             android:textStyle="italic"
             android:maxLines="1" />
         android:layout_marginBottom="10dp"
         android:layout_marginStart="13dp"
         android:layout_marginEnd="10dp"
-        android:textColor="@color/black"
+        android:textColor="?android:attr/textColorPrimary"
         android:textSize="22sp"
         android:ellipsize="end"
         android:maxLines="1" />
index 4b9e9c29fcebf6a6fc03376e7de3e393017adc73..9a27fb90c12dbcc03115c7c81904734103b22ec7 100644 (file)
@@ -25,7 +25,7 @@
     android:layout_height="wrap_content"
     android:layout_width="match_parent"
     android:orientation="horizontal"
-    android:background="@drawable/listview_item_background_selector" >
+    android:background="?attr/listSelectorDrawable" >
 
     <ImageView
         android:id="@+id/bookmark_favorite_icon"
@@ -39,7 +39,7 @@
         android:id="@+id/bookmark_name"
         android:layout_height="wrap_content"
         android:layout_width="wrap_content"
-        android:textColor="@color/black"
+        android:textColor="?android:attr/textColorPrimary"
         android:textSize="22sp"
         android:layout_margin="10dp"
         android:maxLines="1"
index 67a0597adc927b62b67e21e2c2a1f75fe98ef835..d2a22cc01ba14a5825a8465b7d228a6b0f709156 100644 (file)
@@ -24,7 +24,7 @@
     android:layout_height="wrap_content"
     android:layout_width="match_parent"
     android:orientation="horizontal"
-    android:background="?attr/domainsListSelectorColor" >
+    android:background="?attr/listSelectorDrawable" >
 
     <TextView
         android:id="@+id/domain_name_textview"
index 5498244678895c9e89ea05d8801a6096b7e4a237..f2ca9355d1d7f2bdfa991d21d7d24b0d053a690e 100644 (file)
@@ -25,7 +25,7 @@
     android:layout_height="wrap_content"
     android:layout_width="match_parent"
     android:orientation="horizontal"
-    android:background="@drawable/listview_item_background_selector" >
+    tools:ignore="UseCompoundDrawables">
 
     <ImageView
         android:id="@+id/move_to_folder_icon"
@@ -41,6 +41,6 @@
         android:layout_width="wrap_content"
         android:layout_margin="10dp"
         android:maxLines="1"
-        android:textColor="@color/black"
+        android:textColor="?android:attr/textColorPrimary"
         android:textSize="22sp" />
 </LinearLayout>
\ No newline at end of file
index 7ace26ce0c714d4a8004d86af31298bb95936e62..3754800373bf4af1f685e2e3267a4de8fedcef8a 100644 (file)
         android:id="@+id/move_bookmark_up"
         android:title="@string/move_up"
         android:orderInCategory="10"
-        android:icon="@drawable/move_bookmark_up_enabled"
         app:showAsAction="ifRoom" />
 
     <item
         android:id="@+id/move_bookmark_down"
         android:title="@string/move_down"
         android:orderInCategory="20"
-        android:icon="@drawable/move_bookmark_down_enabled"
         app:showAsAction="ifRoom" />
 
     <item
         android:id="@+id/move_to_folder"
         android:title="@string/move_to_folder"
         android:orderInCategory="30"
-        android:icon="@drawable/move_to_folder"
+        android:icon="?attr/moveToFolderIcon"
         app:showAsAction="ifRoom" />
 
     <item
         android:id="@+id/edit_bookmark"
         android:title="@string/edit"
         android:orderInCategory="40"
-        android:icon="@drawable/edit"
+        android:icon="?attr/editIcon"
         app:showAsAction="ifRoom" />
 
     <item
         android:id="@+id/delete_bookmark"
         android:title="@string/delete"
         android:orderInCategory="50"
-        android:icon="@drawable/delete_light"
+        android:icon="?attr/deleteIcon"
         app:showAsAction="ifRoom" />
 
     <item
         android:id="@+id/context_menu_select_all_bookmarks"
         android:title="@string/select_all"
         android:orderInCategory="60"
-        android:icon="@drawable/select_all"
+        android:icon="?attr/selectAllIcon"
         app:showAsAction="ifRoom" />
 </menu>
\ No newline at end of file
index b16acf571bd07f3ea7416eae3ce11cf3562680ea..e91b13429f4b470930a6fe0166868c2ec6755c6b 100644 (file)
         android:id="@+id/create_folder"
         android:title="@string/create_folder"
         android:orderInCategory="10"
-        android:icon="@drawable/create_folder"
+        android:icon="?attr/createFolderIcon"
         app:showAsAction="ifRoom" />
 
     <item
         android:id="@+id/options_menu_select_all_bookmarks"
         android:title="@string/select_all"
         android:orderInCategory="20"
-        android:icon="@drawable/select_all"
+        android:icon="?attr/selectAllIcon"
         app:showAsAction="ifRoom" />
 
     <item
index ec061fb54b075e03d09e934096fbd867e0fb2fb1..8b2ce62c560f682b617368c37dba7670582c7efd 100644 (file)
@@ -21,6 +21,7 @@
 <resources>
     <attr name="appBarTheme" format="reference" />
     <attr name="appBarTextTheme" format="reference" />
+    <attr name="popupsTheme" format="reference" />
     <attr name="tabLayoutTheme" format="reference" />
 
     <attr name="aboutTitle" format="reference" />
@@ -37,7 +38,7 @@
 
     <attr name="findOnPageIconTintColor" format="reference" />
 
-    <attr name="domainsListSelectorColor" format="reference" />
+    <attr name="listSelectorDrawable" format="reference" />
 
     <attr name="iconTintColor" format="reference" />
 
@@ -47,4 +48,8 @@
     <attr name="fontSizeIcon" format="reference" />
     <attr name="deleteIcon" format="reference" />
     <attr name="addIcon" format="reference" />
+    <attr name="createFolderIcon" format="reference" />
+    <attr name="selectAllIcon" format="reference" />
+    <attr name="editIcon" format="reference" />
+    <attr name="moveToFolderIcon" format="reference" />
 </resources>
\ No newline at end of file
index de28d1320fd467c8a6c0dae889e7df4ee4187a80..ffe929a1c18c3f3467427e7abd9ca712be8d5c92 100644 (file)
@@ -21,8 +21,7 @@
 <resources>
     <!-- Light theme styles. -->
 
-    <!-- `android:windowTranslucentStatus` makes the system status bar translucent.
-         When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
+    <!-- `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="colorAccent">@color/blue_700</item>
         <item name="urlHistoryText">@color/black</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.  `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="android:actionModeBackground">@color/blue_700</item>
         <item name="primaryTextColorSelector">@color/primary_text_color_selector_light</item>
-        <item name="domainsListSelectorColor">@drawable/domains_list_selector_light</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="iconTintColor">@color/blue_800</item>
         <item name="deleteIcon">@drawable/delete_light</item>
         <item name="addIcon">@drawable/add_light</item>
+        <item name="createFolderIcon">@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. -->
@@ -89,8 +92,7 @@
 
     <!-- Dark theme styles. -->
 
-    <!-- `android:windowTranslucentStatus` makes the system status bar translucent.
-         When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
+    <!-- `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="android:textColorPrimary">@color/primary_text_color_selector_dark</item>
         <item name="urlHistoryText">@color/gray_200</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="colorPrimaryDark">@color/blue_800</item>
+        <item name="android:actionModeBackground">@color/blue_800</item>
         <item name="primaryTextColorSelector">@color/primary_text_color_selector_dark</item>
         <item name="aboutTitle">@color/blue_600</item>
         <item name="aboutText">@color/blue_400</item>
-        <item name="domainsListSelectorColor">@drawable/domains_list_selector_dark</item>
+        <item name="listSelectorDrawable">@drawable/list_selector_dark</item>
         <item name="iconTintColor">@color/blue_600</item>
         <item name="deleteIcon">@drawable/delete_dark</item>
         <item name="addIcon">@drawable/add_dark</item>
+        <item name="createFolderIcon">@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>
 
     <!-- `ThemeOverlay.AppCompat.Dark` makes the popups have a dark background with light text. -->
-    <!-- <style name="PrivacyBrowserPopupOverlayDark" parent="ThemeOverlay.AppCompat.Dark" /> -->
-
-    <!-- -->
-    <!--<style name="PrivacyBrowserToolbarDark" parent="Widget.AppCompat.Toolbar" >
-        <item name="android:background">@color/gray_900</item>
-    </style> -->
+    <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