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    <!-- TextAppearances -->
19    <!-- =============== -->
20    <eat-comment />
21
22    <!-- Base namespace for all TextAppearances. -->
23    <style name="TextAppearance.Car" parent="TextAppearance.AppCompat" />
24
25    <!-- The styling for title text. The color of this text changes based on day/night mode. -->
26    <style name="TextAppearance.Car.Title">
27        <item name="android:fontFamily">sans-serif-medium</item>
28        <item name="android:textStyle">normal</item>
29        <item name="android:textSize">@dimen/car_title_size</item>
30        <item name="android:textColor">@color/car_title</item>
31    </style>
32
33    <!-- Title text that is permanently a dark color. -->
34    <style name="TextAppearance.Car.Title.Dark">
35        <item name="android:textColor">@color/car_title_dark</item>
36    </style>
37
38    <!-- Title text that is permanently a light color. -->
39    <style name="TextAppearance.Car.Title.Light">
40        <item name="android:textColor">@color/car_title_light</item>
41    </style>
42
43    <!-- The styling for title2 text. The color of this text changes based on day/night mode. -->
44    <style name="TextAppearance.Car.Title2">
45        <item name="android:fontFamily">sans-serif-medium</item>
46        <item name="android:textStyle">normal</item>
47        <item name="android:textSize">@dimen/car_title2_size</item>
48        <item name="android:textColor">@color/car_title2</item>
49    </style>
50
51    <!-- Title2 text that is permanently a dark color. -->
52    <style name="TextAppearance.Car.Title2.Dark">
53        <item name="android:textColor">@color/car_title2_dark</item>
54    </style>
55
56    <!-- Title2 text that is permanently a light color. -->
57    <style name="TextAppearance.Car.Title2.Light">
58        <item name="android:textColor">@color/car_title2_light</item>
59    </style>
60
61    <!-- The styling for subheader text. This text uses color accent. -->
62    <style name="TextAppearance.Car.Subheader" parent="TextAppearance.Car.Title2" >
63        <item name="android:textColor">@color/car_accent</item>
64    </style>
65
66    <!-- Subheader text that is permanently a dark color. -->
67    <style name="TextAppearance.Car.Subheader.Dark" parent="TextAppearance.Car.Subheader" >
68        <item name="android:textColor">@color/car_accent_dark</item>
69    </style>
70
71    <!-- Subheader text that is permanently a light color. -->
72    <style name="TextAppearance.Car.Subheader.Light" parent="TextAppearance.Car.Subheader" >
73        <item name="android:textColor">@color/car_accent_light</item>
74    </style>
75
76    <!-- The styling for the main headline text. The color of this text changes based on the
77         day/night mode. -->
78    <style name="TextAppearance.Car.Headline1">
79        <item name="android:textStyle">normal</item>
80        <item name="android:textSize">@dimen/car_headline1_size</item>
81        <item name="android:textColor">@color/car_headline1</item>
82    </style>
83
84    <!-- Title2 text that is permanently a light color. -->
85    <style name="TextAppearance.Car.Headline1.Light">
86        <item name="android:textColor">@color/car_headline1_light</item>
87    </style>
88
89    <!-- Title2 text that is permanently a dark color. -->
90    <style name="TextAppearance.Car.Headline1.Dark">
91        <item name="android:textColor">@color/car_headline1_dark</item>
92    </style>
93
94    <!-- The styling for a sub-headline text. The color of this text changes based on the
95         day/night mode. -->
96    <style name="TextAppearance.Car.Headline2">
97        <item name="android:textStyle">normal</item>
98        <item name="android:textSize">@dimen/car_headline2_size</item>
99        <item name="android:textColor">@color/car_headline2</item>
100    </style>
101
102    <!-- The styling for a smaller alternate headline text. The color of this text changes based on
103         the day/night mode. -->
104    <style name="TextAppearance.Car.Headline3">
105        <item name="android:textStyle">normal</item>
106        <item name="android:textSize">@dimen/car_headline3_size</item>
107        <item name="android:textColor">@color/car_headline3</item>
108    </style>
109
110    <!-- The styling for the smallest headline text. The color of this text changes based on the
111         day/night mode. -->
112    <style name="TextAppearance.Car.Headline4">
113        <item name="android:textStyle">normal</item>
114        <item name="android:textSize">@dimen/car_headline4_size</item>
115        <item name="android:textColor">@color/car_headline4</item>
116    </style>
117
118    <!-- The styling for label text. The color of this text changes based on the day/night mode. -->
119    <style name="TextAppearance.Car.Label1">
120        <item name="android:textStyle">normal</item>
121        <item name="android:textSize">@dimen/car_label1_size</item>
122        <item name="android:textColor">@color/car_label1</item>
123    </style>
124
125    <!-- The styling for body text. The color of this text changes based on the day/night mode. -->
126    <style name="TextAppearance.Car.Body1">
127        <item name="android:textStyle">normal</item>
128        <item name="android:textSize">@dimen/car_body1_size</item>
129        <item name="android:textColor">@color/car_body1</item>
130    </style>
131
132    <!-- Title2 text that is permanently a light color. -->
133    <style name="TextAppearance.Car.Body1.Light">
134        <item name="android:textColor">@color/car_body1_light</item>
135    </style>
136
137    <!-- Title2 text that is permanently a dark color. -->
138    <style name="TextAppearance.Car.Body1.Dark">
139        <item name="android:textColor">@color/car_body2_dark</item>
140    </style>
141
142    <!-- An alternate styling for body text that is both a different color and size than
143         CarBody1. -->
144    <style name="TextAppearance.Car.Body2">
145        <item name="android:textStyle">normal</item>
146        <item name="android:textSize">@dimen/car_body2_size</item>
147        <item name="android:textColor">@color/car_body2</item>
148    </style>
149
150    <!-- Body2 text that is permanently a light color. -->
151    <style name="TextAppearance.Car.Body2.Light">
152        <item name="android:textColor">@color/car_body2_light</item>
153    </style>
154
155    <!-- Body2 text that is permanently a dark color. -->
156    <style name="TextAppearance.Car.Body2.Dark">
157        <item name="android:textColor">@color/car_body2_dark</item>
158    </style>
159
160    <!-- A smaller styling for body text. The color of this text changes based on the day/night
161         mode. -->
162    <style name="TextAppearance.Car.Body3">
163        <item name="android:textStyle">normal</item>
164        <item name="android:textSize">@dimen/car_body3_size</item>
165        <item name="android:textColor">@color/car_body3</item>
166    </style>
167
168    <!-- The smallest styling for body text. The color of this text changes based on the day/night
169         mode. -->
170    <style name="TextAppearance.Car.Body4">
171        <item name="android:textStyle">normal</item>
172        <item name="android:textSize">@dimen/car_body4_size</item>
173        <item name="android:textColor">@color/car_body4</item>
174    </style>
175
176    <!-- The styling for action button text. -->
177    <style name="TextAppearance.Car.Action1">
178        <item name="android:fontFamily">sans-serif-medium</item>
179        <item name="android:textStyle">normal</item>
180        <item name="android:textAllCaps">true</item>
181        <item name="android:textSize">@dimen/car_action1_size</item>
182        <item name="android:textColor">@color/car_accent</item>
183    </style>
184
185    <!-- The styling for menu text in action bar. -->
186    <style name="TextAppearance.Car.ActionBar.Menu" parent="TextAppearance.Car.Action1">
187        <item name="android:textColor">?attr/actionMenuTextColor</item>
188    </style>
189
190    <!-- Styles for TextInputLayout hints. -->
191    <style name="TextAppearance.Car.Hint" parent="TextAppearance.Car.Body2" />
192
193    <!-- ======= -->
194    <!-- Widgets -->
195    <!-- ======= -->
196    <eat-comment />
197
198    <!-- The styling for Toolbar used as action bar. -->
199    <style name="Widget.Car.Toolbar" parent="Widget.AppCompat.Toolbar">
200        <item name="android:minHeight">?attr/actionBarSize</item>
201        <item name="background">@color/car_card</item>
202        <item name="contentInsetEnd">@dimen/car_keyline_1</item>
203        <item name="contentInsetStart">@dimen/car_keyline_1</item>
204        <item name="elevation">@dimen/car_action_bar_elevation</item>
205        <item name="subtitleTextAppearance">@style/TextAppearance.Car.Body2</item>
206        <item name="titleTextAppearance">@style/TextAppearance.Car.Title2</item>
207        <item name="navigationIcon">@drawable/ic_nav_arrow_back</item>
208    </style>
209
210    <!-- The styling for the navigation button in action bar. -->
211    <style name="Widget.Car.Toolbar.Button.Navigation"
212           parent="Widget.AppCompat.Toolbar.Button.Navigation">
213        <item name="android:background">@drawable/car_card_ripple_background</item>
214        <item name="android:scaleType">center</item>
215        <item name="android:tint">@color/car_tint</item>
216    </style>
217
218    <style name="Widget.Car.ActionButton" parent="Widget.AppCompat.ActionButton">
219        <item name="android:background">?attr/actionBarItemBackground</item>
220        <item name="android:minHeight">@dimen/car_action_bar_height</item>
221        <item name="android:paddingLeft">@dimen/car_padding_2</item>
222        <item name="android:paddingRight">@dimen/car_padding_2</item>
223        <item name="android:scaleType">fitCenter</item>
224        <item name="android:tint">@color/car_tint</item>
225    </style>
226
227    <!-- The style for the menu bar (i.e. hamburger) and back arrow in the navigation drawer. -->
228    <style name="Widget.Car.DrawerArrowToggle" parent="Widget.AppCompat.DrawerArrowToggle">
229        <item name="color">@color/car_title2</item>
230        <item name="spinBars">true</item>
231        <item name="barLength">@dimen/car_menu_bar_length</item>
232        <item name="thickness">@dimen/car_arrow_thickness</item>
233        <item name="gapBetweenBars">@dimen/car_menu_bar_spacing</item>
234        <item name="arrowShaftLength">@dimen/car_arrow_shaft_length</item>
235        <item name="arrowHeadLength">@dimen/car_arrow_head_length</item>
236        <item name="drawableSize">@dimen/car_arrow_size</item>
237    </style>
238
239    <!-- The styles for the regular and borderless buttons. -->
240    <style name="Widget.Car.Button" parent="Widget.AppCompat.Button">
241        <item name="android:fontFamily">sans-serif-medium</item>
242        <item name="android:layout_height">@dimen/car_button_height</item>
243        <item name="android:minWidth">@dimen/car_button_min_width</item>
244        <item name="android:paddingStart">@dimen/car_button_horizontal_padding</item>
245        <item name="android:paddingEnd">@dimen/car_button_horizontal_padding</item>
246        <item name="android:textSize">@dimen/car_action1_size</item>
247        <item name="android:background">@drawable/car_button_background</item>
248        <item name="android:textColor">@drawable/car_button_text_color</item>
249    </style>
250
251    <style name="Widget.Car.Button.Borderless.Colored" parent="Widget.AppCompat.Button.Borderless.Colored">
252        <item name="android:fontFamily">sans-serif-medium</item>
253        <item name="android:layout_height">@dimen/car_button_height</item>
254        <item name="android:minWidth">@dimen/car_button_min_width</item>
255        <item name="android:paddingStart">@dimen/car_borderless_button_horizontal_padding</item>
256        <item name="android:paddingEnd">@dimen/car_borderless_button_horizontal_padding</item>
257        <item name="android:textSize">@dimen/car_action1_size</item>
258        <item name="android:textColor">@drawable/car_borderless_button_text_color</item>
259    </style>
260
261    <style name="Widget.Car.Button.Borderless.Colored.Light">
262        <item name="android:textColor">@drawable/car_borderless_button_text_color</item>
263    </style>
264
265    <style name="Widget.Car.Button.Borderless.Colored.Dark">
266        <item name="android:textColor">@drawable/car_borderless_button_text_color</item>
267    </style>
268
269    <!-- Style for the progress bars. -->
270    <style name="Widget.Car.ProgressBar.Horizontal" parent="Widget.AppCompat.ProgressBar.Horizontal">
271        <item name="android:minHeight">@dimen/car_progress_bar_height</item>
272        <item name="android:maxHeight">@dimen/car_progress_bar_height</item>
273    </style>
274
275    <style name="Widget.Car.EditText" parent="Widget.AppCompat.EditText">
276        <item name="android:textColor">?attr/editTextColor</item>
277        <item name="android:textAppearance">@style/TextAppearance.Car.Body1</item>
278    </style>
279
280    <!-- Styling for the seek bars. -->
281    <style name="Widget.Car.SeekBar" parent="Widget.AppCompat.SeekBar">
282        <item name="android:progressDrawable">@drawable/car_seekbar_track</item>
283        <item name="android:thumb">@drawable/car_seekbar_thumb</item>
284    </style>
285
286    <!-- Styling for seek bars that is fixed to a dark color for thumb and progress. -->
287    <style name="Widget.Car.SeekBar.Dark">
288        <item name="android:progressDrawable">@drawable/car_seekbar_track_light</item>
289        <item name="android:thumb">@drawable/car_seekbar_thumb_dark</item>
290    </style>
291
292    <!-- Styling for seek bars that is fixed to a light color for thumb and progress. -->
293    <style name="Widget.Car.SeekBar.Light">
294        <item name="android:progressDrawable">@drawable/car_seekbar_track_dark</item>
295        <item name="android:thumb">@drawable/car_seekbar_thumb_light</item>
296    </style>
297
298    <style name="CarListVerticalDivider">
299        <item name="android:layout_width">@dimen/car_vertical_line_divider_width</item>
300        <item name="android:layout_height">@dimen/car_vertical_line_divider_height</item>
301        <item name="android:layout_marginStart">@dimen/car_padding_4</item>
302        <item name="android:background">@color/car_list_divider</item>
303    </style>
304
305    <!-- ============= -->
306    <!-- List Themes -->
307    <!-- ============= -->
308    <eat-comment />
309
310    <!-- The default styling for a PagedListView. -->
311    <style name="Widget.Car.List" parent="android:Widget">
312        <item name="dayNightStyle">auto</item>
313        <item name="listDividerColor">@color/car_list_divider</item>
314    </style>
315
316    <!-- A styling for the PagedListView that has inverted colors for day/night. -->
317    <style name="Widget.Car.List.Inverse">
318        <item name="dayNightStyle">auto_inverse</item>
319        <item name="listDividerColor">@color/car_list_divider_inverse</item>
320    </style>
321
322    <!-- A styling for the PagedListView that is fixed to a light color. -->
323    <style name="Widget.Car.Light.List" parent="Widget.Car.List">
324        <item name="dayNightStyle">force_night</item>
325    </style>
326
327    <!-- A styling for the PagedListView that is fixed to a light color and has dividers that are
328         also fixed to a light color. -->
329    <style name="Widget.Car.Light.List.LightDivider">
330        <item name="listDividerColor">@color/car_list_divider_light</item>
331    </style>
332
333    <!-- A styling for the PagedListView that is fixed to a dark color. -->
334    <style name="Widget.Car.Dark.List" parent="Widget.Car.List">
335        <item name="dayNightStyle">force_day</item>
336    </style>
337
338    <!-- A styling for the PagedListView that is fixed to a dark color and has dividers that are
339         also fixed to a dark color. -->
340    <style name="Widget.Car.Dark.List.LightDivider">
341        <item name="listDividerColor">@color/car_list_divider_light</item>
342    </style>
343
344    <!-- ============= -->
345    <!-- ListItem Themes -->
346    <!-- ============= -->
347    <eat-comment />
348
349    <!-- A styling for ListItems that has dark text on a light-colored background. This style
350         will automatically switch to darker colors during night mode. -->
351    <style name="Widget.Car.ListItem" parent="android:Widget">
352        <item name="listItemBackgroundColor">@color/car_card</item>
353        <item name="listItemTitleTextAppearance">@style/TextAppearance.Car.Body1</item>
354        <item name="listItemBodyTextAppearance">@style/TextAppearance.Car.Body2</item>
355    </style>
356
357    <!-- A styling for ListItems that has light text on a dark-colored background. This style
358         will remain dark in night mode. -->
359    <style name="Widget.Car.ListItem.Dark">
360        <item name="listItemBackgroundColor">@color/car_card_dark</item>
361        <item name="listItemTitleTextAppearance">@style/TextAppearance.Car.Body1.Light</item>
362        <item name="listItemBodyTextAppearance">@style/TextAppearance.Car.Body2.Light</item>
363    </style>
364
365    <!-- ============= -->
366    <!-- Dialog Themes -->
367    <!-- ============= -->
368    <eat-comment />
369
370    <!-- Base namespace for dialog styles. -->
371    <style name="Widget.Car.Dialog" parent="android:Widget" />
372
373    <!-- The title text for a dialog. -->
374    <style name="Widget.Car.Dialog.Title">
375        <item name="android:maxLines">1</item>
376        <item name="android:textAppearance">@style/TextAppearance.Car.Title2</item>
377        <item name="android:ellipsize">end</item>
378        <item name="android:textAlignment">viewStart</item>
379    </style>
380
381    <!-- Title text for a dialog that is fixed in a light color. -->
382    <style name="Widget.Car.Dialog.Title.Light">
383        <item name="android:textAppearance">@style/TextAppearance.Car.Title2.Light</item>
384    </style>
385
386    <!-- Title text for a dialog that is fixed in a dark color. -->
387    <style name="Widget.Car.Dialog.Title.Dark">
388        <item name="android:textAppearance">@style/TextAppearance.Car.Title2.Dark</item>
389    </style>
390
391    <!-- The body text for a dialog. -->
392    <style name="Widget.Car.Dialog.Body">
393        <item name="android:textAppearance">@style/TextAppearance.Car.Body2</item>
394    </style>
395
396    <!-- Body text for a dialog that is fixed in a light color. -->
397    <style name="Widget.Car.Dialog.Body.Light">
398        <item name="android:textAppearance">@style/TextAppearance.Car.Body2.Light</item>
399    </style>
400
401    <!-- Body text for a dialog that is fixed in a dark color. -->
402    <style name="Widget.Car.Dialog.Body.Dark">
403        <item name="android:textAppearance">@style/TextAppearance.Car.Body2.Dark</item>
404    </style>
405
406    <!-- ================ -->
407    <!-- ActionBar Themes -->
408    <!-- ================ -->
409    <eat-comment />
410
411    <!-- Styles for action buttons -->
412    <style name="Widget.Car.Button.ActionBar">
413        <item name="android:scaleType">fitCenter</item>
414        <item name="android:padding">@dimen/car_action_button_icon_inset</item>
415        <item name="android:background">@drawable/car_action_button_background</item>
416        <item name="android:tint">@color/car_tint</item>
417    </style>
418</resources>
419