1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2017 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8  http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16<resources>
17    <!-- =============== -->
18    <!-- Main Car Themes -->
19    <!-- =============== -->
20    <eat-comment />
21
22    <!-- Base style for the Car. This theme has light colors for card backgrounds and dark
23         text. These colors will invert for night. -->
24    <style name="Theme.Car.NoActionBar" parent="Theme.AppCompat.NoActionBar">
25        <item name="android:colorAccent">@color/car_accent</item>
26        <item name="android:colorButtonNormal">@color/car_accent</item>
27        <item name="android:colorControlHighlight">@color/car_card_ripple_background</item>
28        <item name="android:buttonStyle">@style/Widget.Car.Button</item>
29        <item name="android:borderlessButtonStyle">@style/Widget.Car.Button.Borderless.Colored</item>
30        <item name="android:progressBarStyleHorizontal">@style/Widget.Car.ProgressBar.Horizontal</item>
31        <item name="android:textColorHint">@color/car_body2</item>
32        <item name="android:editTextStyle">@style/Widget.Car.EditText</item>
33        <item name="android:editTextColor">@color/car_body1</item>
34        <item name="android:colorControlNormal">@color/car_body2</item>
35        <item name="android:seekBarStyle">@style/Widget.Car.SeekBar</item>
36        <item name="actionBarItemBackground">@drawable/car_card_ripple_background</item>
37        <item name="actionBarSize">@dimen/car_app_bar_height</item>
38        <item name="actionButtonStyle">@style/Widget.Car.ActionButton</item>
39        <item name="actionMenuTextAppearance">@style/TextAppearance.Car.ActionBar.Menu</item>
40        <item name="actionMenuTextColor">@color/car_accent</item>
41        <item name="carDialogTheme">@style/Theme.Car.Dialog</item>
42        <item name="colorControlHighlight">@color/car_card_ripple_background</item>
43        <item name="listItemBackgroundColor">@color/car_card</item>
44        <item name="listItemTitleTextAppearance">@style/TextAppearance.Car.Body1</item>
45        <item name="listItemBodyTextAppearance">@style/TextAppearance.Car.Body2</item>
46        <item name="listItemSubheaderTextAppearance">@style/TextAppearance.Car.Subheader</item>
47        <item name="pagedListViewStyle">@style/Widget.Car.List</item>
48        <item name="toolbarNavigationButtonStyle">@style/Widget.Car.Toolbar.Button.Navigation</item>
49        <item name="toolbarStyle">@style/Widget.Car.Toolbar</item>
50    </style>
51
52    <!-- Theme for the Car that is a passthrough for the default theme. -->
53    <style name="Theme.Car.Light.NoActionBar" parent="Theme.Car.NoActionBar" />
54
55    <!-- Theme for the Car that will have dark colors for card backgrounds and light color for
56         text. The colors will not change for night mode. -->
57    <style name="Theme.Car.Dark.NoActionBar" parent="Theme.Car.NoActionBar">
58        <item name="android:alertDialogTheme">@style/Theme.Car.Dark.Dialog.Alert</item>
59        <item name="android:colorControlHighlight">@color/car_card_ripple_background_inverse</item>
60        <item name="android:seekBarStyle">@style/Widget.Car.SeekBar.Light</item>
61        <item name="alertDialogTheme">@style/Theme.Car.Dark.Dialog.Alert</item>
62        <item name="carDialogTheme">@style/Theme.Car.Dark.Dialog</item>
63        <item name="colorControlHighlight">@color/car_card_ripple_background_inverse</item>
64        <item name="pagedListViewStyle">@style/Widget.Car.Light.List.LightDivider</item>
65        <item name="listItemBackgroundColor">@color/car_card_dark</item>
66        <item name="listItemTitleTextAppearance">@style/TextAppearance.Car.Body1.Light</item>
67        <item name="listItemBodyTextAppearance">@style/TextAppearance.Car.Body2.Light</item>
68        <item name="listItemSubheaderTextAppearance">@style/TextAppearance.Car.Subheader.Light</item>
69    </style>
70
71    <!-- A Theme for activities that have a drawer affordance. This theme will automatically switch
72         to darker colors during night mode. -->
73    <style name="Theme.Car.NoActionBar.Drawer">
74        <item name="drawerArrowStyle">@style/Widget.Car.DrawerArrowToggle</item>
75        <item name="drawerBackgroundColor">@color/car_card</item>
76        <item name="drawerRippleColor">@color/car_card_ripple_background</item>
77        <item name="drawerHeaderColor">@color/car_title2</item>
78        <item name="drawerItemTitleTextAppearance">@style/TextAppearance.Car.Body1</item>
79        <item name="drawerItemBodyTextAppearance">@style/TextAppearance.Car.Body2</item>
80        <item name="drawerListStyle">@style/Widget.Car.List</item>
81    </style>
82
83    <!-- A Theme for activities that have a drawer affordance. This theme will automatically switch
84         to darker colors during night mode. -->
85    <style name="Theme.Car.Light.NoActionBar.Drawer" parent="Theme.Car.NoActionBar.Drawer" />
86
87    <!-- A dark-colored theme for activities that have a drawer affordance. -->
88    <style name="Theme.Car.Dark.NoActionBar.Drawer">
89        <item name="drawerArrowStyle">@style/Widget.Car.DrawerArrowToggle</item>
90        <item name="drawerBackgroundColor">@color/car_card_dark</item>
91        <item name="drawerRippleColor">@color/car_card_ripple_background_light</item>
92        <item name="drawerHeaderColor">@color/car_title2_light</item>
93        <item name="drawerItemTitleTextAppearance">@style/TextAppearance.Car.Body1.Light</item>
94        <item name="drawerItemBodyTextAppearance">@style/TextAppearance.Car.Body2.Light</item>
95        <item name="drawerListStyle">@style/Widget.Car.Light.List.LightDivider</item>
96    </style>
97
98    <!-- ============= -->
99    <!-- Dialog Themes -->
100    <!-- ============= -->
101    <eat-comment />
102
103    <!-- Base style for dialogs provided by the car support library. -->
104    <style name="Theme.Car.Dialog" parent="Theme.AppCompat.Dialog">
105        <item name="android:colorControlHighlight">@color/car_card_ripple_background</item>
106        <item name="android:windowIsTranslucent">true</item>
107        <item name="android:windowBackground">@android:color/transparent</item>
108        <item name="colorControlHighlight">@color/car_card_ripple_background</item>
109        <item name="dialogButtonStyle">@style/Widget.Car.Button.Borderless.Colored</item>
110        <item name="dialogBackgroundColor">@color/car_card</item>
111        <item name="dialogListTheme">@style/Theme.Car.List</item>
112        <item name="dialogTitleStyle">@style/Widget.Car.Dialog.Title</item>
113        <item name="dialogBodyStyle">@style/Widget.Car.Dialog.Body</item>
114    </style>
115
116    <!-- Styling for dialogs provided by the car support library that is fixed in a dark-color. -->
117    <style name="Theme.Car.Dark.Dialog" parent="Theme.Car.Dialog">
118        <item name="android:colorControlHighlight">@color/car_card_ripple_background_inverse</item>
119        <item name="colorControlHighlight">@color/car_card_ripple_background_inverse</item>
120        <item name="dialogButtonStyle">@style/Widget.Car.Button.Borderless.Colored</item>
121        <item name="dialogBackgroundColor">@color/car_card_dark</item>
122        <item name="dialogListTheme">@style/Theme.Car.Light.List.DarkItems</item>
123        <item name="dialogTitleStyle">@style/Widget.Car.Dialog.Title.Light</item>
124        <item name="dialogBodyStyle">@style/Widget.Car.Dialog.Body.Light</item>
125    </style>
126
127    <!-- ===================================== -->
128    <!-- Framework and AppCompat Dialog Themes -->
129    <!-- ===================================== -->
130
131    <!-- Styles for framework and the Appcompat AlertDialog. This style will automatically
132         change the background color of the dialog based on the day/night mode. -->
133    <style name="Theme.Car.Dialog.Alert" parent="Theme.AppCompat.Dialog.Alert">
134        <item name="android:background">@color/car_card</item>
135        <item name="android:borderlessButtonStyle">@style/Widget.Car.Button.Borderless.Colored</item>
136        <item name="android:colorButtonNormal">@color/car_accent</item>
137        <item name="android:listDividerAlertDialog">@drawable/car_list_divider</item>
138        <item name="android:textColorPrimary">@color/car_body2</item>
139        <item name="android:windowTitleStyle">@style/Widget.Car.Dialog.Title</item>
140        <item name="buttonBarNeutralButtonStyle">@style/Widget.Car.Button.Borderless.Colored</item>
141        <item name="buttonBarNegativeButtonStyle">@style/Widget.Car.Button.Borderless.Colored</item>
142        <item name="buttonBarPositiveButtonStyle">@style/Widget.Car.Button.Borderless.Colored</item>
143    </style>
144
145    <!-- Style for framework and the Appcompat AlertDialog that is fixed to have a light colored
146         background. -->
147    <style name="Theme.Car.Light.Dialog.Alert" parent="Theme.Car.Dialog.Alert">
148        <item name="android:background">@color/car_card_light</item>
149        <item name="android:listDividerAlertDialog">@drawable/car_list_divider_dark</item>
150        <item name="android:textColorPrimary">@color/car_body2_dark</item>
151        <item name="android:windowTitleStyle">@style/Widget.Car.Dialog.Title.Dark</item>
152    </style>
153
154    <!-- Style for framework and the Appcompat AlertDialog that is fixed to have a dark colored
155         background. -->
156    <style name="Theme.Car.Dark.Dialog.Alert" parent="Theme.Car.Dialog.Alert">
157        <item name="android:background">@color/car_card_dark</item>
158        <item name="android:listDividerAlertDialog">@drawable/car_list_divider_light</item>
159        <item name="android:textColorPrimary">@color/car_body2_light</item>
160        <item name="android:windowTitleStyle">@style/Widget.Car.Dialog.Title.Light</item>
161    </style>
162
163    <!-- =========== -->
164    <!-- List Themes -->
165    <!-- =========== -->
166    <eat-comment />
167
168    <!-- A theme for PagedListViews that will have a dark scrollbars and light-colored items. The
169         colors will darken during night mode. -->
170    <style name="Theme.Car.List" parent="android:Theme">
171        <item name="pagedListViewStyle">@style/Widget.Car.List</item>
172        <item name="listItemBackgroundColor">@color/car_card</item>
173        <item name="listItemTitleTextAppearance">@style/TextAppearance.Car.Body1</item>
174        <item name="listItemBodyTextAppearance">@style/TextAppearance.Car.Body2</item>
175    </style>
176
177    <!-- A theme for PagedListViews that will have a light scrollbars and light-colored items. The
178         colors will darken during night mode. -->
179    <style name="Theme.Car.Light.List" parent="Theme.Car.List">
180        <item name="pagedListViewStyle">@style/Widget.Car.Light.List.LightDivider</item>
181    </style>
182
183    <!-- A theme for PagedListViews that will have a light scrollbars and dark-colored items. The
184         colors do not change for night mode. -->
185    <style name="Theme.Car.Light.List.DarkItems">
186        <item name="listItemBackgroundColor">@color/car_card_dark</item>
187        <item name="listItemTitleTextAppearance">@style/TextAppearance.Car.Body1.Light</item>
188        <item name="listItemBodyTextAppearance">@style/TextAppearance.Car.Body2.Light</item>
189    </style>
190</resources>
191