<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"
<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"
@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.
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;
// 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.
@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);
} 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`.
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`.
+++ /dev/null
-<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<!-- `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>
+++ /dev/null
-<?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
+++ /dev/null
-<?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
+++ /dev/null
-<?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
+++ /dev/null
-<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<?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
--- /dev/null
+<?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
+++ /dev/null
-<?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
+++ /dev/null
-<!-- `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>
+++ /dev/null
-<!-- `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>
+++ /dev/null
-<!-- `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>
+++ /dev/null
-<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<!-- `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>
+++ /dev/null
-<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<!-- `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>
+++ /dev/null
-<!-- `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>
--- /dev/null
+<!-- `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>
--- /dev/null
+<!-- `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>
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.
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>
<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
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>
android:layout_width="50dp"
android:layout_marginEnd="10dp"
android:gravity="end"
- android:textColor="@color/black"
+ android:textColor="?android:attr/textColorPrimary"
android:textSize="22sp" />
<ImageView
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" />
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"
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"
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"
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"
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
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
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
<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" />
<attr name="findOnPageIconTintColor" format="reference" />
- <attr name="domainsListSelectorColor" format="reference" />
+ <attr name="listSelectorDrawable" format="reference" />
<attr name="iconTintColor" format="reference" />
<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
<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. -->
<!-- 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