]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/values/styles.xml
Create a dark theme for `MainWebViewActivity`.
[PrivacyBrowserAndroid.git] / app / src / main / res / values / styles.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2015-2017 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
7
8   Privacy Browser is free software: you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation, either version 3 of the License, or
11   (at your option) any later version.
12
13   Privacy Browser is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18   You should have received a copy of the GNU General Public License
19   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
20
21 <resources>
22     <!-- Light theme styles. -->
23
24     <!-- `android:windowTranslucentStatus` makes the system status bar translucent.
25         When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
26     <style name="PrivacyBrowserLight" parent="Theme.AppCompat.Light.NoActionBar" >
27         <item name="android:windowTranslucentStatus">true</item>
28         <item name="colorAccent">@color/blue_700</item>
29         <item name="android:textColorHighlight">@color/blue_200</item>
30     </style>
31
32     <!-- `colorPrimaryDark` goes behind the status bar, which is then darkened by the overlay.
33         `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
34     <style name="PrivacyBrowserLight.SecondaryActivity" >
35         <item name="colorPrimaryDark">@color/blue_700</item>
36         <item name="android:textColorHighlight">@color/blue_200</item>
37         <item name="windowActionModeOverlay">true</item>
38         <item name="android:actionModeBackground">@color/blue_700</item>
39         <item name="actionBarPopupTheme">@style/PrivacyBrowserPopupOverlayLight</item>
40         <item name="android:spinnerItemStyle">@style/spinnerItemStyle</item>
41         <item name="android:spinnerDropDownItemStyle">@style/spinnerDropDownItemStyle</item>
42     </style>
43
44     <!-- `colorPrimaryDark` is the color of the status bar. -->
45     <style name="Settings" parent="Theme.AppCompat.Light.DarkActionBar" >
46         <item name="colorPrimary">@color/blue_700</item>
47         <item name="colorPrimaryDark">@color/blue_900</item>
48         <item name="colorAccent">@color/blue_700</item>
49     </style>
50
51     <!-- `ThemeOverlay.AppCompat.Dark.ActionBar` makes the text and the icons in the AppBar white. -->
52     <style name="DarkAppBar" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
53
54     <!-- `ThemeOverlay.AppCompat.ActionBar` makes the hamburger icons dark. -->
55     <style name="PrivacyBrowserAppBarOverlayLight" parent="ThemeOverlay.AppCompat.ActionBar" />
56
57     <!-- `ThemeOverlay.AppCompat.Light` makes the popups have a light background with dark text. -->
58     <style name="PrivacyBrowserPopupOverlayLight" parent="ThemeOverlay.AppCompat.Light" />
59
60     <style name="LightAlertDialog" parent="Theme.AppCompat.Light.Dialog.Alert" >
61         <item name="colorAccent">@color/blue_700</item>
62     </style>
63
64     <!-- This `Spinner` style is needed to fix a layout bug in Huawei devices running Android 7.0. -->
65     <style name="spinnerItemStyle" >
66         <item name="android:paddingStart">8dp</item>
67         <item name="android:textColor">@color/black</item>
68         <item name="android:textSize">18sp</item>
69     </style>
70
71     <!-- This `Spinner` style is needed to fix a layout bug in Huawei devices running Android 7.0. -->
72     <style name="spinnerDropDownItemStyle" >
73         <item name="android:paddingStart">16dp</item>
74         <item name="android:paddingEnd">16dp</item>
75         <item name="android:paddingTop">8dp</item>
76         <item name="android:paddingBottom">8dp</item>
77         <item name="android:textColor">@color/black</item>
78         <item name="android:textSize">18sp</item>
79     </style>
80
81
82     <!-- Dark theme styles. -->
83
84     <!-- `android:windowTranslucentStatus` makes the system status bar translucent.
85         When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
86     <style name="PrivacyBrowserDark" parent="Theme.AppCompat.NoActionBar" >
87         <item name="android:windowTranslucentStatus">true</item>
88         <item name="android:textColorPrimary">@color/dark_primary_text_color_selector</item>
89         <item name="colorAccent">@color/blue_900</item>
90         <item name="android:textColorHighlight">@color/blue_800</item>
91     </style>
92
93     <!-- `ThemeOverlay.AppCompat.Dark.ActionBar` makes the hamburger icons light. -->
94     <!-- <style name="PrivacyBrowserAppBarOverlayDark" parent="ThemeOverlay.AppCompat.Dark.ActionBar" >
95         <item name="android:background">@color/gray_900</item>
96     </style> -->
97
98     <!-- `ThemeOverlay.AppCompat.Dark` makes the popups have a dark background with light text. -->
99     <!-- <style name="PrivacyBrowserPopupOverlayDark" parent="ThemeOverlay.AppCompat.Dark" /> -->
100
101     <!-- -->
102     <!--<style name="PrivacyBrowserToolbarDark" parent="Widget.AppCompat.Toolbar" >
103         <item name="android:background">@color/gray_900</item>
104     </style> -->
105 </resources>