]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Create a dark theme for `DomainsActivity` and `DomainsSettingsActivity`.
authorSoren Stoutner <soren@stoutner.com>
Wed, 21 Jun 2017 21:06:33 +0000 (14:06 -0700)
committerSoren Stoutner <soren@stoutner.com>
Wed, 21 Jun 2017 21:06:33 +0000 (14:06 -0700)
28 files changed:
app/src/main/AndroidManifest.xml
app/src/main/java/com/stoutner/privacybrowser/activities/DomainSettingsActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/DomainsActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/fragments/DomainSettingsFragment.java
app/src/main/res/color/dark_primary_text_color_selector.xml [deleted file]
app/src/main/res/color/primary_text_color_selector_dark.xml [new file with mode: 0644]
app/src/main/res/color/primary_text_color_selector_light.xml [new file with mode: 0644]
app/src/main/res/drawable/add.xml [deleted file]
app/src/main/res/drawable/add_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/add_light.xml [new file with mode: 0644]
app/src/main/res/drawable/delete.xml [deleted file]
app/src/main/res/drawable/delete_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/delete_light.xml [new file with mode: 0644]
app/src/main/res/drawable/domains_list_selector_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/domains_list_selector_light.xml [new file with mode: 0644]
app/src/main/res/layout-w900dp/domains_list.xml
app/src/main/res/layout/bookmarks_coordinatorlayout.xml
app/src/main/res/layout/domain_name_linearlayout.xml
app/src/main/res/layout/domain_settings.xml
app/src/main/res/layout/domain_settings_coordinatorlayout.xml
app/src/main/res/layout/domains_coordinatorlayout.xml
app/src/main/res/layout/domains_list.xml
app/src/main/res/menu/bookmarks_context_menu.xml
app/src/main/res/menu/domains_options_menu.xml
app/src/main/res/values/attrs.xml
app/src/main/res/values/colors.xml
app/src/main/res/values/styles.xml

index 015c4ecb136db51086683380ee257d312464cfd8..004984e5468a7a314cd684c0e16769d6878a9752 100644 (file)
         <activity
             android:name=".activities.DomainsActivity"
             android:label="@string/domains"
-            android:theme="@style/PrivacyBrowserLight.SecondaryActivity"
             android:parentActivityName=".activities.MainWebViewActivity"
             android:screenOrientation="fullUser"
             android:persistableMode="persistNever"
         <activity
             android:name=".activities.DomainSettingsActivity"
             android:label="@string/domain_settings"
-            android:theme="@style/PrivacyBrowserLight.SecondaryActivity"
             android:parentActivityName=".activities.DomainsActivity"
             android:configChanges="orientation|screenSize"
             android:screenOrientation="fullUser"
index 49364db391fde22c76b1156d4e4e3ccfde974b21..17529eba4b3ee097dd06c00b6805eca973f0009b 100644 (file)
@@ -45,7 +45,17 @@ public class DomainSettingsActivity extends AppCompatActivity {
 
     @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.domain_settings_coordinatorlayout);
 
         // We ned to use `SupportActionBar` from `android.support.v7.app.ActionBar` until the minimum API is >= 21.
index 320cddb8e57ebc781b4266db2ad3518a20b91669..e98b5fc13cbdd4e8fbe110681505a0ed87056fa6 100644 (file)
@@ -71,15 +71,25 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
 
     @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.domains_coordinatorlayout);
 
         // Get a handle for the context.
         context = this;
 
         // We need to use the `SupportActionBar` from `android.support.v7.app.ActionBar` until the minimum API is >= 21.
-        final Toolbar bookmarksAppBar = (Toolbar) findViewById(R.id.domains_toolbar);
-        setSupportActionBar(bookmarksAppBar);
+        final Toolbar domainsAppBar = (Toolbar) findViewById(R.id.domains_toolbar);
+        setSupportActionBar(domainsAppBar);
 
         // Display the home arrow on `SupportActionBar`.
         ActionBar appBar = getSupportActionBar();
@@ -90,7 +100,7 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
         // The `0` specifies the database version, but that is ignored and set instead using a constant in `DomainsDatabaseHelper`.
         domainsDatabaseHelper = new DomainsDatabaseHelper(this, null, null, 0);
 
-        // Determine if we are in two pane mode.  `domains_settings_linearlayout` is only populated if two panes are present.
+        // Determine if we are in two pane mode.  `domains_settings_scrollview` is only populated if two panes are present.
         twoPaneMode = ((findViewById(R.id.domain_settings_scrollview)) != null);
 
         // Initialize `domainsListView`.
@@ -104,10 +114,6 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
 
                 // Display the Domain Settings.
                 if (twoPaneMode) {  // Display a fragment in two paned mode.
-                    // Enable the options `MenuItems`.
-                    saveMenuItem.setEnabled(true);
-                    deleteMenuItem.setEnabled(true);
-
                     // Store `databaseId` in `argumentsBundle`.
                     Bundle argumentsBundle = new Bundle();
                     argumentsBundle.putInt(DomainSettingsFragment.DATABASE_ID, databaseId);
@@ -118,11 +124,6 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
 
                     // Display `domainSettingsFragment`.
                     getSupportFragmentManager().beginTransaction().replace(R.id.domain_settings_scrollview, domainSettingsFragment).commit();
-
-                    // Enable the options `MenuItems`.
-                    deleteMenuItem.setEnabled(true);
-                    deleteMenuItem.setIcon(R.drawable.delete);
-                    saveMenuItem.setEnabled(true);
                 } else { // Load the second activity on smaller screens.
                     // Create `domainSettingsActivityIntent` with the `databaseId`.
                     Intent domainSettingsActivityIntent = new Intent(context, DomainSettingsActivity.class);
@@ -309,7 +310,7 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
 
                                         // Enable the options `MenuItems`.
                                         deleteMenuItem.setEnabled(true);
-                                        deleteMenuItem.setIcon(R.drawable.delete);
+                                        deleteMenuItem.setIcon(R.drawable.delete_light);
                                         saveMenuItem.setEnabled(true);
                                         break;
 
@@ -399,8 +400,14 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
 
             // Enable the options `MenuItems`.
             deleteMenuItem.setEnabled(true);
-            deleteMenuItem.setIcon(R.drawable.delete);
             saveMenuItem.setEnabled(true);
+
+            // Set the delete icon according to the theme.
+            if (MainWebViewActivity.darkTheme) {
+                deleteMenuItem.setIcon(R.drawable.delete_dark);
+            } else {
+                deleteMenuItem.setIcon(R.drawable.delete_light);
+            }
         } else {
             // Disable the options `MenuItems`.
             deleteMenuItem.setEnabled(false);
index ff129178e93398ebf299bd2f7734cda47b6dc745..24acf91685d318f0d673776dcba907c5ea5cbd9a 100644 (file)
@@ -122,8 +122,8 @@ 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`, `CreateBookmarkDialog`, `CreateBookmarkFolderDialog`, `DownloadFileDialog`, `DownloadImageDialog`, `EditBookmarkDialog`,
-    // `EditBookmarkFolderDialog`, `MoveToFolderDialog`, `SslCertificateErrorDialog`, `UrlHistoryDialog`, `ViewSslCertificateDialog`, `CreateHomeScreenShortcutDialog`, and `OrbotProxyHelper`.
+    // `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()`.
     public static boolean darkTheme;
 
index a231391c40ab0cffdf7bc8a268519b6a87da25a7..ff18669c5719742acba30277c511bfe37e91473f 100644 (file)
@@ -152,7 +152,13 @@ public class DomainSettingsFragment extends Fragment {
             firstPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_enabled));
         } else {  // First-party cookies are disabled.
             firstPartyCookiesEnabledSwitch.setChecked(false);
-            firstPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+
+            // Set the icon according to the theme.
+            if (MainWebViewActivity.darkTheme) {
+                firstPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_dark));
+            } else {
+                firstPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+            }
         }
 
         // Only display third-party cookies if SDK_INT >= 21.
@@ -165,17 +171,29 @@ public class DomainSettingsFragment extends Fragment {
                     thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_warning));
                 } else {  // First party cookies are enabled but third-party cookies are disabled.
                     thirdPartyCookiesEnabledSwitch.setChecked(false);
-                    thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+
+                    // Set the icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_dark));
+                    } else {
+                        thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+                    }
                 }
             } else {  // First-party cookies are disabled.
-                // Set the status of third-party cookies, but disable it.
-                if (thirdPartyCookiesEnabledInt == 1) {  // Third-party cookies are enabled but first-party cookies are disabled.
+                // Set the status of third-party cookies.
+                if (thirdPartyCookiesEnabledInt == 1) {
                     thirdPartyCookiesEnabledSwitch.setChecked(true);
-                    thirdPartyCookiesEnabledSwitch.setEnabled(false);
-                    thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_ghosted_light));
-                } else {  // Both first party and third-party cookies are disabled.
+                } else {
                     thirdPartyCookiesEnabledSwitch.setChecked(false);
-                    thirdPartyCookiesEnabledSwitch.setEnabled(false);
+                }
+
+                // Disable the third-party cookies switch.
+                thirdPartyCookiesEnabledSwitch.setEnabled(false);
+
+                // Set the icon according to the theme.
+                if (MainWebViewActivity.darkTheme) {
+                    thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_ghosted_dark));
+                } else {
                     thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_ghosted_light));
                 }
             }
@@ -191,8 +209,15 @@ public class DomainSettingsFragment extends Fragment {
                 domStorageEnabledSwitch.setChecked(true);
                 domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_enabled));
             } else {  // JavaScript is enabled but DOM storage is disabled.
+                // Set the DOM storage switch to off.
                 domStorageEnabledSwitch.setChecked(false);
-                domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_disabled_light));
+
+                // Set the icon according to the theme.
+                if (MainWebViewActivity.darkTheme) {
+                    domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_disabled_dark));
+                } else {
+                    domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_disabled_light));
+                }
             }
         } else {  // JavaScript is disabled.
             // Set the checked status of DOM storage.
@@ -202,9 +227,15 @@ public class DomainSettingsFragment extends Fragment {
                 domStorageEnabledSwitch.setChecked(false);
             }
 
-            // Disable `domStorageEnabledSwitch` and set the icon to be ghosted.
+            // Disable `domStorageEnabledSwitch`.
             domStorageEnabledSwitch.setEnabled(false);
-            domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_ghosted_light));
+
+            // Set the icon according to the theme.
+            if (MainWebViewActivity.darkTheme) {
+                domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_ghosted_dark));
+            } else {
+                domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_ghosted_light));
+            }
         }
 
         // Set the form data status.  Once minimum API >= 21 we can use a selector as the tint mode instead of specifying different icons.
@@ -212,8 +243,15 @@ public class DomainSettingsFragment extends Fragment {
             formDataEnabledSwitch.setChecked(true);
             formDataImageView.setImageDrawable(getResources().getDrawable(R.drawable.form_data_enabled));
         } else {  // Form data is disabled.
+            // Set the form data switch to off.
             formDataEnabledSwitch.setChecked(false);
-            formDataImageView.setImageDrawable(getResources().getDrawable(R.drawable.form_data_disabled_light));
+
+            // Set the icon according to the theme.
+            if (MainWebViewActivity.darkTheme) {
+                formDataImageView.setImageDrawable(getResources().getDrawable(R.drawable.form_data_disabled_dark));
+            } else {
+                formDataImageView.setImageDrawable(getResources().getDrawable(R.drawable.form_data_disabled_light));
+            }
         }
 
         // We need to inflated a `WebView` to get the default user agent.
@@ -269,18 +307,38 @@ public class DomainSettingsFragment extends Fragment {
         switch (displayImagesInt) {
             case DomainsDatabaseHelper.DISPLAY_WEBPAGE_IMAGES_SYSTEM_DEFAULT:
                 if (MainWebViewActivity.displayWebpageImagesBoolean) {
-                    displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_light));
+                    // Set the icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_dark));
+                    } else {
+                        displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_light));
+                    }
                 } else {
-                    displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_light));
+                    // Set the icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_dark));
+                    } else {
+                        displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_light));
+                    }
                 }
                 break;
 
             case DomainsDatabaseHelper.DISPLAY_WEBPAGE_IMAGES_ENABLED:
-                displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_light));
+                // Set the icon according to the theme.
+                if (MainWebViewActivity.darkTheme) {
+                    displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_dark));
+                } else {
+                    displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_light));
+                }
                 break;
 
             case DomainsDatabaseHelper.DISPLAY_WEBPAGE_IMAGES_DISABLED:
-                displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_light));
+                // Set the icon according to the theme.
+                if (MainWebViewActivity.darkTheme) {
+                    displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_dark));
+                } else {
+                    displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_light));
+                }
                 break;
         }
 
@@ -300,7 +358,12 @@ public class DomainSettingsFragment extends Fragment {
                     if (domStorageEnabledSwitch.isChecked()) {  // DOM storage is enabled.
                         domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_enabled));
                     } else {  // DOM storage is disabled.
-                        domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_disabled_light));
+                        // Set the icon according to the theme.
+                        if (MainWebViewActivity.darkTheme) {
+                            domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_disabled_dark));
+                        } else {
+                            domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_disabled_light));
+                        }
                     }
                 } else {  // JavaScript is disabled.
                     // Update the JavaScript icon.
@@ -309,8 +372,12 @@ public class DomainSettingsFragment extends Fragment {
                     // Disable the DOM storage `Switch`.
                     domStorageEnabledSwitch.setEnabled(false);
 
-                    // Set the DOM storage icon to be ghosted.
-                    domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_ghosted_light));
+                    // Set the DOM storage icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_ghosted_dark));
+                    } else {
+                        domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_ghosted_light));
+                    }
                 }
             }
         });
@@ -330,17 +397,30 @@ public class DomainSettingsFragment extends Fragment {
                     if (thirdPartyCookiesEnabledSwitch.isChecked()) {  // Third-party cookies are enabled.
                         thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_warning));
                     } else {  // Third-party cookies are disabled.
-                        thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+                        // Set the third-party cookies icon according to the theme.
+                        if (MainWebViewActivity.darkTheme) {
+                            thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_dark));
+                        } else {
+                            thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+                        }
                     }
                 } else {  // First-party cookies are disabled.
-                    // Update the first-party cookies icon.
-                    firstPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+                    // Update the first-party cookies icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        firstPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_dark));
+                    } else {
+                        firstPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+                    }
 
                     // Disable the third-party cookies `Switch`.
                     thirdPartyCookiesEnabledSwitch.setEnabled(false);
 
-                    // Set the third-party cookies icon to be ghosted.
-                    thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_ghosted_light));
+                    // Set the third-party cookies icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_ghosted_dark));
+                    } else {
+                        thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_ghosted_light));
+                    }
                 }
             }
         });
@@ -353,7 +433,12 @@ public class DomainSettingsFragment extends Fragment {
                 if (isChecked) {
                     thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_warning));
                 } else {
-                    thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+                    // Update the third-party cookies icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_dark));
+                    } else {
+                        thirdPartyCookiesImageView.setImageDrawable(getResources().getDrawable(R.drawable.cookies_disabled_light));
+                    }
                 }
             }
         });
@@ -366,7 +451,12 @@ public class DomainSettingsFragment extends Fragment {
                 if (isChecked) {
                     domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_enabled));
                 } else {
-                    domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_disabled_light));
+                    // Set the icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_disabled_dark));
+                    } else {
+                        domStorageImageView.setImageDrawable(getResources().getDrawable(R.drawable.dom_storage_disabled_light));
+                    }
                 }
             }
         });
@@ -379,7 +469,12 @@ public class DomainSettingsFragment extends Fragment {
                 if (isChecked) {
                     formDataImageView.setImageDrawable(getResources().getDrawable(R.drawable.form_data_enabled));
                 } else {
-                    formDataImageView.setImageDrawable(getResources().getDrawable(R.drawable.form_data_disabled_light));
+                    // Set the icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        formDataImageView.setImageDrawable(getResources().getDrawable(R.drawable.form_data_disabled_dark));
+                    } else {
+                        formDataImageView.setImageDrawable(getResources().getDrawable(R.drawable.form_data_disabled_light));
+                    }
                 }
             }
         });
@@ -436,18 +531,38 @@ public class DomainSettingsFragment extends Fragment {
                 switch (position) {
                     case DomainsDatabaseHelper.DISPLAY_WEBPAGE_IMAGES_SYSTEM_DEFAULT:
                         if (MainWebViewActivity.displayWebpageImagesBoolean) {
-                            displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_light));
+                            // Set the icon according to the theme.
+                            if (MainWebViewActivity.darkTheme) {
+                                displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_dark));
+                            } else {
+                                displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_light));
+                            }
                         } else {
-                            displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_light));
+                            // Set the icon according to the theme.
+                            if (MainWebViewActivity.darkTheme) {
+                                displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_dark));
+                            } else {
+                                displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_light));
+                            }
                         }
                         break;
 
                     case DomainsDatabaseHelper.DISPLAY_WEBPAGE_IMAGES_ENABLED:
-                        displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_light));
+                        // Set the icon according to the theme.
+                        if (MainWebViewActivity.darkTheme) {
+                            displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_dark));
+                        } else {
+                            displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_enabled_light));
+                        }
                         break;
 
                     case DomainsDatabaseHelper.DISPLAY_WEBPAGE_IMAGES_DISABLED:
-                        displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_light));
+                        // Set the icon according to the theme.
+                        if (MainWebViewActivity.darkTheme) {
+                            displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_dark));
+                        } else {
+                            displayWebpageImagesImageView.setImageDrawable(getResources().getDrawable(R.drawable.images_disabled_light));
+                        }
                         break;
                 }
             }
diff --git a/app/src/main/res/color/dark_primary_text_color_selector.xml b/app/src/main/res/color/dark_primary_text_color_selector.xml
deleted file mode 100644 (file)
index 27f283e..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/>. -->
-
-<!-- Change the dark theme enabled text from white to gray. -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android" >
-    <!-- `#4Dffffff` comes from the built-in `@color/primary_text_disabled_material_dark`. -->
-    <item android:state_enabled="false" android:color="#4Dffffff" />
-    <item android:color="@color/gray_300" />
-</selector>
\ No newline at end of file
diff --git a/app/src/main/res/color/primary_text_color_selector_dark.xml b/app/src/main/res/color/primary_text_color_selector_dark.xml
new file mode 100644 (file)
index 0000000..d4cd7f8
--- /dev/null
@@ -0,0 +1,26 @@
+<?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/>. -->
+
+<!-- Change the dark theme enabled text from white to gray. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+    <!-- `#4DFFFFFF` comes from the built-in `@color/primary_text_disabled_material_dark`. -->
+    <item android:state_enabled="false" android:color="#4DFFFFFF" />
+    <item android:color="@color/gray_300" />
+</selector>
\ No newline at end of file
diff --git a/app/src/main/res/color/primary_text_color_selector_light.xml b/app/src/main/res/color/primary_text_color_selector_light.xml
new file mode 100644 (file)
index 0000000..4ed8c1f
--- /dev/null
@@ -0,0 +1,25 @@
+<?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/>. -->
+
+<!-- Change the dark theme enabled text from white to gray. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item android:state_enabled="false" android:color="@color/gray_400" />
+    <item android:color="@color/black" />
+</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/add.xml b/app/src/main/res/drawable/add.xml
deleted file mode 100644 (file)
index d902679..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `add.xml` comes from the Android Material icon set, where it is called `ic_add`.  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="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
-</vector>
diff --git a/app/src/main/res/drawable/add_dark.xml b/app/src/main/res/drawable/add_dark.xml
new file mode 100644 (file)
index 0000000..1da26b7
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `add_dark.xml` comes from the Android Material icon set, where it is called `ic_add`.  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="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
+</vector>
diff --git a/app/src/main/res/drawable/add_light.xml b/app/src/main/res/drawable/add_light.xml
new file mode 100644 (file)
index 0000000..a64e797
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `add_light.xml` comes from the Android Material icon set, where it is called `ic_add`.  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="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
+</vector>
diff --git a/app/src/main/res/drawable/delete.xml b/app/src/main/res/drawable/delete.xml
deleted file mode 100644 (file)
index eb9ac2c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `delete.xml` comes from the Android Material icon set, where it is called `ic_delete`.  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="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
-</vector>
diff --git a/app/src/main/res/drawable/delete_dark.xml b/app/src/main/res/drawable/delete_dark.xml
new file mode 100644 (file)
index 0000000..472e033
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `delete_dark.xml` comes from the Android Material icon set, where it is called `ic_delete`.  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="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
+</vector>
diff --git a/app/src/main/res/drawable/delete_light.xml b/app/src/main/res/drawable/delete_light.xml
new file mode 100644 (file)
index 0000000..db7980d
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `delete_light.xml` comes from the Android Material icon set, where it is called `ic_delete`.  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="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
+</vector>
diff --git a/app/src/main/res/drawable/domains_list_selector_dark.xml b/app/src/main/res/drawable/domains_list_selector_dark.xml
new file mode 100644 (file)
index 0000000..da370c9
--- /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 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
new file mode 100644 (file)
index 0000000..904cf99
--- /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 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
index 455045e48ea5fc945df09dc69c1199efca73f1b2..a97d59ec88c3f827384dac590061b4dac6c68a43 100644 (file)
@@ -38,7 +38,7 @@
         android:layout_width="0dp"
         android:layout_weight="2"
         android:choiceMode="singleChoice"
-        android:divider="@color/white"
+        android:divider="@color/transparent"
         android:dividerHeight="0dp" />
 
     <ScrollView
index 1185cd84c91266c0d40c3441c1fd9f4986692d4b..3eb252739d39865bcc691424f61fb8c8340f7d6b 100644 (file)
@@ -67,5 +67,5 @@
         android:layout_width="wrap_content"
         android:layout_gravity="bottom|end"
         android:layout_margin="16dp"
-        android:src="@drawable/add" />
+        android:src="?attr/addIcon" />
 </android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
index a821d448b0d061f92875676a1a343dae623a41c5..67a0597adc927b62b67e21e2c2a1f75fe98ef835 100644 (file)
     android:layout_height="wrap_content"
     android:layout_width="match_parent"
     android:orientation="horizontal"
-    android:background="@drawable/domains_list_selector" >
+    android:background="?attr/domainsListSelectorColor" >
 
     <TextView
         android:id="@+id/domain_name_textview"
         android:layout_height="wrap_content"
         android:layout_width="match_parent"
-        android:textColor="@color/black"
+        android:textColor="?android:attr/textColorPrimary"
         android:textSize="22sp"
         android:layout_margin="10dp"
         android:maxLines="1"
index 0a08e9110f023eb3a66d6e3bd715e00164c6f425..5be6793e4d77e0429b827bba6a6e96541561f124 100644 (file)
@@ -54,7 +54,7 @@
                     android:layout_marginBottom="12dp"
                     android:layout_gravity="bottom"
                     android:src="@drawable/domains"
-                    android:tint="@color/blue_800"
+                    android:tint="?attr/iconTintColor"
                     tools:ignore="contentDescription" />
 
                 <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
                 android:layout_marginTop="14dp"
                 android:layout_marginBottom="14dp"
                 android:text="@string/javascript_enabled"
+                android:textColor="?attr/primaryTextColorSelector"
                 android:textSize="18sp" />
         </LinearLayout>
 
                 android:layout_marginTop="14dp"
                 android:layout_marginBottom="14dp"
                 android:text="@string/first_party_cookies_enabled"
+                android:textColor="?attr/primaryTextColorSelector"
                 android:textSize="18sp" />
         </LinearLayout>
 
                 android:layout_marginTop="14dp"
                 android:layout_marginBottom="14dp"
                 android:text="@string/third_party_cookies_enabled"
+                android:textColor="?attr/primaryTextColorSelector"
                 android:textSize="18sp" />
         </LinearLayout>
 
                 android:layout_marginTop="14dp"
                 android:layout_marginBottom="14dp"
                 android:text="@string/dom_storage_enabled"
+                android:textColor="?attr/primaryTextColorSelector"
                 android:textSize="18sp" />
         </LinearLayout>
 
                 android:layout_marginTop="14dp"
                 android:layout_marginBottom="14dp"
                 android:text="@string/form_data_enabled"
+                android:textColor="?attr/primaryTextColorSelector"
                 android:textSize="18sp" />
         </LinearLayout>
 
                     android:layout_marginEnd="10dp"
                     android:layout_gravity="center_vertical"
                     android:src="@drawable/user_agent_light"
+                    android:tint="?attr/iconTintColor"
                     android:contentDescription="@string/user_agent" />
 
                 <Spinner
                 android:layout_marginEnd="10dp"
                 android:layout_gravity="center_vertical"
                 android:src="@drawable/font_size_light"
+                android:tint="?attr/iconTintColor"
                 android:contentDescription="@string/font_size" />
 
             <Spinner
index 00c31dce7efc5f58035fc2780486b5aea105a3a1..e196ad5d299b4d5ad5d15cf27d88879dad109667 100644 (file)
@@ -22,7 +22,6 @@
 <android.support.design.widget.CoordinatorLayout
     android:id="@+id/domain_settings_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:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:theme="@style/PrivacyBrowserAppBarLight" >
+            android:layout_width="match_parent" >
 
-            <!-- `android:theme="@style/PrivacyBrowser.DarkAppBar"1 makes the text and icons in the `AppBar` white. -->
             <android.support.v7.widget.Toolbar
                 android:id="@+id/domain_settings_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>
 
         <ScrollView
index c39a0ece175903e3cbd1bb77bd5a00b2657475d4..f60466ef58956ac72c4d5d54f549ec2e7332322c 100644 (file)
@@ -21,7 +21,6 @@
 <!-- `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
     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: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/domains_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>
 
         <include layout="@layout/domains_list" />
@@ -56,5 +52,5 @@
         android:layout_width="wrap_content"
         android:layout_gravity="bottom|end"
         android:layout_margin="16dp"
-        android:src="@drawable/add" />
+        android:src="?attr/addIcon" />
 </android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
index cd76c68bd23da682f12d7ef98576c2b8b8f8459e..312f41f4951953ca13780cc73debc698206f2355 100644 (file)
@@ -26,5 +26,5 @@
     tools:context=".activities.DomainsActivity"
     android:layout_height="match_parent"
     android:layout_width="match_parent"
-    android:divider="@color/white"
+    android:divider="@color/transparent"
     android:dividerHeight="0dp" />
\ No newline at end of file
index 0b7ce4ef631390877b2da534b22276b3b21a6f4a..7ace26ce0c714d4a8004d86af31298bb95936e62 100644 (file)
@@ -54,7 +54,7 @@
         android:id="@+id/delete_bookmark"
         android:title="@string/delete"
         android:orderInCategory="50"
-        android:icon="@drawable/delete"
+        android:icon="@drawable/delete_light"
         app:showAsAction="ifRoom" />
 
     <item
index 36958f5025d060e02765c01d245b5ada4b8cc6bb..a5bbf84430a46b78a8b292f875290a37c07d8a01 100644 (file)
@@ -26,7 +26,7 @@
         android:id="@+id/delete_domain"
         android:title="@string/delete"
         android:orderInCategory="10"
-        android:icon="@drawable/delete"
+        android:icon="?attr/deleteIcon"
         app:showAsAction="ifRoom" />
 
     <item
index 03752209cc55779d76ecaa1f3a651c9e6bfc93e8..ec061fb54b075e03d09e934096fbd867e0fb2fb1 100644 (file)
@@ -27,6 +27,7 @@
     <attr name="aboutText" format="reference" />
     <attr name="sslTitle" format="reference" />
     <attr name="urlHistoryText" format="reference" />
+    <attr name="primaryTextColorSelector" format="reference" />
 
     <attr name="navigationHeaderBackground" format="reference" />
     <attr name="navigationHeaderTextColor" format="reference" />
 
     <attr name="findOnPageIconTintColor" format="reference" />
 
+    <attr name="domainsListSelectorColor" format="reference" />
+
+    <attr name="iconTintColor" format="reference" />
+
     <attr name="userAgentIcon" format="reference" />
     <attr name="searchIcon" format="reference" />
     <attr name="homepageIcon" format="reference" />
     <attr name="fontSizeIcon" format="reference" />
+    <attr name="deleteIcon" format="reference" />
+    <attr name="addIcon" format="reference" />
 </resources>
\ No newline at end of file
index 46629aaa824768f1294aa76ce676578fc40e3197..48d1f7c0b1fa2a6a20a34670491288b499115f73 100644 (file)
@@ -34,6 +34,7 @@
     <color name="blue_700">#FF1976D2</color>
     <color name="blue_800">#FF1565C0</color>
     <color name="blue_900">#FF0D47A1</color>
+    <color name="blue_1000">#FF082B61</color>
     <color name="blue_a700">#FF2962FF</color>
 
     <color name="blue_gray_500">#FF607D8B</color>
index d493579d304fe269bbce6a790f21b9700e47ad94..de28d1320fd467c8a6c0dae889e7df4ee4187a80 100644 (file)
         <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="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="actionBarPopupTheme">@style/PrivacyBrowserPopupsLight</item>
         <item name="appBarTextTheme">@style/PrivacyBrowserAppBarWhiteText</item>
         <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutLight</item>
@@ -88,7 +93,7 @@
          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="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>
     </style>
 
     <style name="PrivacyBrowserDark.SecondaryActivity" >
-        <item name="colorPrimaryDark">@color/blue_900</item>
-        <item name="aboutTitle">@color/blue_700</item>
+        <item name="colorPrimaryDark">@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="iconTintColor">@color/blue_600</item>
+        <item name="deleteIcon">@drawable/delete_dark</item>
+        <item name="addIcon">@drawable/add_dark</item>
         <item name="appBarTextTheme">@style/PrivacyBrowserAppBarDark</item>
         <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutDark</item>
+        <item name="android:spinnerDropDownItemStyle">@style/PrivacyBrowserSpinnerDropDownItemStyleDark</item>
     </style>
 
     <style name="PrivacyBrowserSettingsDark" parent="Theme.AppCompat" >
-        <item name="android:textColorPrimary">@color/dark_primary_text_color_selector</item>
+        <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>
     <!-- Configure the About and Guide `TabLayouts`. -->
     <style name="PrivacyBrowserTabLayoutDark" parent="Widget.Design.TabLayout" >
         <item name="tabBackground">@color/blue_900</item>
-        <item name="android:textColorSecondary">@color/blue_400</item>
+        <item name="android:textColorSecondary">@color/blue_300</item>
         <item name="tabIndicatorColor">@color/gray_300</item>
     </style>
 
         <item name="android:textColor">@color/gray_300</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="PrivacyBrowserPopupOverlayDark" parent="ThemeOverlay.AppCompat.Dark" /> -->