1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. -->
6 <resources xmlns:tools="http://schemas.android.com/tools">
7 <!-- Q: Why put style resources under values-v17/ ?
9 1. paddingStart causes a crash on Galaxy Tab&Note b/8351339.
10 2. So we wrote a build script(generate_v14_compatible_resources.py) to convert
11 paddingStart to paddingLeft for pre-v17 (crbug.com/235118).
12 3. However, style files are not overrided by the corresponding generated style files,
13 but merged when we pass them to aapt unlike layout files.
15 So we decided to keep style resources under values-v17/ so that it is not merged with
16 the generated style resources under res_v14_compatibility/values/ (crbug.com/243952).
19 <style name="MainTheme" parent="Theme.AppCompat.Light.NoActionBar">
20 <item name="android:windowContentOverlay">@null</item>
21 <item name="android:textColorHighlight">@color/text_highlight_color</item>
22 <item name="android:textColorLink">@color/light_active_color</item>
23 <item name="android:statusBarColor" tools:targetApi="21">@android:color/black</item>
25 <!-- Overriding AppCompat values -->
26 <item name="colorControlNormal">@color/light_normal_color</item>
27 <item name="colorControlActivated">@color/light_active_color</item>
29 <!-- Default TintedImageButton tint -->
30 <item name="tint">@color/dark_mode_tint</item>
32 <!-- Navigation Transitions, requires API level 21 -->
33 <item name="android:windowAllowEnterTransitionOverlap" tools:targetApi="21">false</item>
34 <item name="android:windowAllowReturnTransitionOverlap" tools:targetApi="21">true</item>
35 <item name="android:windowContentTransitions" tools:targetApi="21">true</item>
36 <item name="android:windowEnterTransition" tools:targetApi="21">@transition/fade</item>
37 <item name="android:windowExitTransition" tools:targetApi="21">@null</item>
38 <item name="android:windowSharedElementEnterTransition" tools:targetApi="21">@transition/move_image</item>
39 <item name="android:windowSharedElementExitTransition" tools:targetApi="21">@transition/move_image</item>
42 <style name="WebappTheme" parent="MainTheme">
43 <item name="android:windowBackground">@null</item>
44 <item name="android:windowDisablePreview">true</item>
47 <!-- A theme for alert dialogs. The colors are copied from MainTheme, and the window
48 dimensions are copied from *.MinWidth theme variants. Sadly there is no
49 AppCompat.Light.Dialog.Alert or even AppCompat.Light.Dialog.MinWidth. -->
50 <style name="AlertDialogTheme" parent="Theme.AppCompat.Light.Dialog">
51 <item name="android:textColorHighlight">@color/text_highlight_color</item>
52 <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
53 <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
55 <!-- Overriding AppCompat values -->
56 <item name="colorAccent">@color/light_active_color</item>
57 <item name="colorControlActivated">@color/light_active_color</item>
58 <item name="colorControlNormal">@color/light_normal_color</item>
59 <item name="colorPrimary">@color/light_active_color</item>
61 <!-- Default TintedImageButton tint -->
62 <item name="tint">@color/dark_mode_tint</item>
66 <style name="PreferencesTheme" parent="ThemeWithActionBar">
67 <item name="android:textColorLink">@color/pref_accent_color</item>
68 <item name="android:textAppearanceMedium">@style/PreferenceTextAppearanceMedium</item>
69 <item name="android:preferenceCategoryStyle">@style/PreferenceCategory</item>
70 <item name="android:spinnerItemStyle">@style/PreferenceSpinnerItem</item>
71 <item name="floatLabelTextAppearance">@style/PreferenceFloatLabelTextAppearance</item>
72 <item name="floatLabelPaddingLeft">@dimen/pref_autofill_field_horizontal_padding</item>
73 <item name="floatLabelPaddingRight">@dimen/pref_autofill_field_horizontal_padding</item>
74 <item name="floatLabelPaddingTop">@dimen/pref_autofill_field_top_padding</item>
76 <style name="PreferenceTextAppearanceMedium">
77 <item name="android:textSize">18sp</item>
78 <item name="android:textColor">?android:attr/textColorPrimary</item>
80 <style name="PreferenceCategory">
81 <item name="android:layout">@layout/preference_category</item>
82 <item name="android:shouldDisableView">false</item>
83 <item name="android:selectable">false</item>
85 <style name="PreferenceCategoryWithButtonStyle">
86 <item name="android:paddingStart">8dp</item>
87 <item name="android:paddingEnd">4dp</item>
88 <item name="android:paddingTop">16dp</item>
89 <item name="android:layout_marginBottom">16dp</item>
91 <style name="PreferenceCategoryTextStyle">
92 <item name="android:textColor">@color/pref_accent_color</item>
93 <item name="android:textSize">14sp</item>
94 <item name="android:textStyle">bold</item>
96 <style name="PreferenceTitle">
97 <item name="android:ellipsize">end</item>
98 <item name="android:singleLine">true</item>
99 <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
101 <style name="PreferenceSummary">
102 <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
103 <item name="android:textColor">?android:attr/textColorSecondary</item>
105 <style name="PreferenceScreenLayout">
106 <item name="android:paddingTop">16dp</item>
107 <item name="android:paddingStart">16dp</item>
108 <item name="android:paddingEnd">16dp</item>
110 <style name="PreferenceLayoutBase">
111 <item name="android:background">?android:attr/activatedBackgroundIndicator</item>
112 <item name="android:minHeight">?android:attr/listPreferredItemHeight</item>
113 <item name="android:paddingTop">6dp</item>
114 <item name="android:paddingBottom">6dp</item>
115 <item name="android:paddingStart">8dp</item>
116 <item name="android:paddingEnd">8dp</item>
118 <style name="PreferenceLayout" parent="PreferenceLayoutBase" />
119 <style name="DeprecationWarningPreferenceTheme" parent="PreferencesTheme">
120 <item name="android:textSize">14sp</item>
122 <style name="PreferenceFloatLabelTextAppearance">
123 <item name="android:textColor">@color/float_label</item>
124 <item name="android:textSize">14sp</item>
126 <style name="PreferenceSpinnerItem">
127 <item name="android:textAppearance">@style/PreferenceTextAppearanceMedium</item>
129 <style name="PreferenceSpinnerUnderlineView">
130 <item name="android:layout_width">match_parent</item>
131 <item name="android:layout_height">1dp</item>
132 <item name="android:layout_marginTop">2dp</item>
133 <item name="android:background">@color/input_underline_color</item>
136 <style name="ThemeWithActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
137 <item name="android:windowBackground">@drawable/action_bar_activity_bg</item>
138 <!-- Action bar color -->
139 <item name="colorPrimary">@color/dark_action_bar_color</item>
140 <!-- Status bar color -->
141 <item name="colorPrimaryDark">#161e21</item>
142 <!-- Color of checkboxes, switches, buttons, etc. -->
143 <item name="colorAccent">@color/pref_accent_color</item>
146 <!-- Alert dialogs -->
147 <style name="AlertDialogContent">
148 <item name="android:layout_width">match_parent</item>
149 <item name="android:layout_height">wrap_content</item>
150 <item name="android:paddingStart">@dimen/dialog_padding_sides</item>
151 <item name="android:paddingEnd">@dimen/dialog_padding_sides</item>
152 <item name="android:paddingTop">@dimen/dialog_padding_top</item>
154 <style name="AlertDialogEditTextItem">
155 <item name="android:layout_width">match_parent</item>
156 <item name="android:layout_height">wrap_content</item>
157 <item name="android:textSize">18sp</item>
158 <item name="android:singleLine">true</item>
159 <item name="android:paddingTop">10dp</item>
161 <style name="AlertDialogSummaryViewItem" parent="@android:style/TextAppearance.Small">
162 <item name="android:layout_width">match_parent</item>
163 <item name="android:layout_height">wrap_content</item>
164 <item name="android:textAlignment">viewStart</item>
165 <item name="android:paddingTop">10dp</item>
168 <style name="BoldTextFieldLabel" parent="@android:style/TextAppearance.Medium">
169 <item name="android:layout_width">match_parent</item>
170 <item name="android:layout_height">wrap_content</item>
171 <item name="android:textSize">14sp</item>
172 <item name="android:textAlignment">viewStart</item>
173 <item name="android:textStyle">bold</item>
174 <item name="android:paddingTop">10dp</item>
175 <!-- These aren't really clickable, this is just a hack to make labels
176 accessibility focusable. -->
177 <item name="android:clickable">true</item>
179 <style name="OverflowMenuTheme" parent="Theme.AppCompat.Light">
180 <item name="android:popupBackground">@null</item>
181 <item name="android:listDivider">@null</item>
182 <item name="android:listPreferredItemHeightSmall">48dp</item>
183 <item name="android:textSize">16sp</item>
185 <style name="OverflowMenuAnim">
186 <item name="android:windowEnterAnimation">@anim/menu_enter</item>
187 <item name="android:windowExitAnimation">@anim/menu_exit</item>
189 <style name="DistilledPagePrefThemeButton">
190 <item name="android:layout_width">0dp</item>
191 <item name="android:layout_height">wrap_content</item>
192 <item name="android:layout_weight">1</item>
193 <item name="android:button">@null</item>
194 <item name="android:gravity">center</item>
195 <item name="android:textAppearance">
196 ?android:attr/textAppearanceMedium
198 <item name="android:padding">8dp</item>
199 <item name="android:background">
200 @drawable/distilled_page_prefs_button_bg
204 <!-- Button bar styles -->
205 <style name="ButtonBarTopSpacer">
206 <item name="android:layout_width">0dp</item>
207 <item name="android:layout_height">0dp</item>
208 <item name="android:layout_weight">1</item>
209 <item name="android:minHeight">5dp</item>
211 <style name="ButtonBarTopDivider">
212 <item name="android:layout_width">match_parent</item>
213 <item name="android:layout_height">1dp</item>
214 <item name="android:background">?android:attr/dividerHorizontal</item>
216 <style name="ButtonBar" parent="@android:style/Holo.Light.ButtonBar.AlertDialog">
217 <item name="android:layout_width">match_parent</item>
218 <item name="android:layout_height">wrap_content</item>
219 <item name="android:divider">?android:attr/dividerVertical</item>
220 <item name="android:dividerPadding">0dp</item>
221 <item name="android:showDividers">middle</item>
223 <style name="ButtonBarButton" parent="@android:style/Widget.Holo.Light.Button">
224 <item name="android:layout_width">0dp</item>
225 <item name="android:layout_height">match_parent</item>
226 <item name="android:layout_weight">1</item>
227 <item name="android:background">?attr/selectableItemBackground</item>
228 <item name="android:paddingStart">4dp</item>
229 <item name="android:paddingEnd">4dp</item>
231 <style name="info_bubble">
232 <item name="android:textColor">@android:color/white</item>
233 <item name="android:textStyle">bold</item>
234 <item name="android:textSize">18sp</item>
236 <style name="FullscreenNotificationBubble" parent="@android:style/Animation.Toast">
237 <item name="android:windowEnterAnimation">@anim/fullscreen_notification_in</item>
241 <style name="DataReductionPromoScreenDialog" >
242 <item name="android:background">@android:color/transparent</item>
243 <item name="android:backgroundDimEnabled">false</item>
244 <item name="android:clipChildren">false</item>
245 <item name="android:clipToPadding">false</item>
246 <item name="android:windowAnimationStyle">@null</item>
247 <item name="android:windowBackground">@android:color/transparent</item>
248 <item name="android:windowCloseOnTouchOutside">false</item>
249 <item name="android:windowContentOverlay">@null</item>
250 <item name="android:windowFrame">@null</item>
251 <item name="android:windowFullscreen">false</item>
252 <item name="android:windowIsFloating">true</item>
253 <item name="android:windowIsTranslucent">true</item>
254 <item name="android:windowNoTitle">true</item>
256 <!-- Cast and media playback notifications -->
258 name="MediaNotificationTitle"
259 parent="@android:style/TextAppearance.StatusBar.EventContent.Title"/>
261 name="MediaNotificationText"
262 parent="@android:style/TextAppearance.StatusBar.EventContent"/>
264 name="RemoteNotificationTitle"
265 parent="@android:style/TextAppearance.StatusBar.EventContent.Title"/>
267 name="RemoteNotificationText"
268 parent="@android:style/TextAppearance.StatusBar.EventContent"/>
270 name="RemoteNotificationProgressBar"
271 parent="@android:style/Widget.Holo.ProgressBar.Horizontal"/>
272 <style name="CastMediaRouteButton" parent="@style/Widget.MediaRouter.MediaRouteButton">
273 <item name="android:background">@null</item>
274 <item name="android:paddingTop">0dp</item>
275 <item name="android:paddingBottom">0dp</item>
276 <item name="android:paddingStart">0dp</item>
277 <item name="android:paddingEnd">0dp</item>
278 <item name="externalRouteEnabledDrawable">@drawable/ic_cast_dark_chrome</item>
281 <!-- First Run and Bookmark/recent-tabs dialogs -->
282 <style name="DialogWhenLarge" parent="Theme.AppCompat.Light.DialogWhenLarge" >
283 <item name="android:windowBackground">@drawable/bg_white_dialog</item>
284 <item name="android:statusBarColor" tools:targetApi="21">@android:color/black</item>
285 <item name="android:textColorLink">@color/light_active_color</item>
286 <item name="colorPrimary">@color/light_active_color</item>
287 <item name="colorAccent">@color/light_active_color</item>
289 <!-- Remove ActionBar -->
290 <item name="windowNoTitle">true</item>
291 <item name="windowActionBar">false</item>
294 <!-- Legacy Bookmarks -->
295 <style name="DialogWhenLargeHolo" parent="@android:style/Theme.Holo.Light.DialogWhenLarge" >
296 <item name="android:windowActionBar">false</item>
297 <item name="android:windowNoTitle">true</item>
299 <style name="AlertDialogTitle" parent="@android:style/TextAppearance.Large">
300 <item name="android:layout_width">wrap_content</item>
301 <item name="android:layout_height">wrap_content</item>
302 <item name="android:textColor">@android:color/holo_blue_light</item>
303 <item name="android:paddingStart">15dp</item>
304 <item name="android:paddingEnd">15dp</item>
305 <item name="android:gravity">center_vertical</item>
306 <item name="android:minHeight">64dp</item>
307 <!-- Not clickable, this is a hack to make alert titles accessibility focusable. -->
308 <item name="android:clickable">true</item>
310 <style name="AlertDialogTitleDivider">
311 <item name="android:layout_width">match_parent</item>
312 <item name="android:layout_height">2dp</item>
313 <item name="android:background">@android:color/holo_blue_light</item>
316 <!-- Enhanced bookmarks -->
317 <style name="EnhancedBookmarkDialog" parent="Theme.AppCompat.Light.DialogWhenLarge">
318 <item name="android:windowBackground">@android:color/transparent</item>
319 <item name="colorPrimaryDark">@android:color/black</item>
320 <item name="colorAccent">@color/light_active_color</item>
322 <!-- Remove ActionBar -->
323 <item name="windowNoTitle">true</item>
324 <item name="windowActionBar">false</item>
326 <style name="EnhancedBookmarkDialogWhite" parent="EnhancedBookmarkDialog">
327 <item name="android:windowBackground">@drawable/bg_white_dialog</item>
329 <style name="EnhancedBookmarkTitleBarButton">
330 <item name="android:layout_width">wrap_content</item>
331 <item name="android:layout_height">wrap_content</item>
332 <item name="android:background">@null</item>
333 <item name="android:padding">15dp</item>
335 <style name="EnhancedBookmarkMenuStyle" parent="Widget.AppCompat.ListPopupWindow">
336 <item name="android:popupBackground">@drawable/menu_bg</item>
338 <style name="EnhancedBookmarkDrawerItemStyle">
339 <item name="android:layout_width">match_parent</item>
340 <item name="android:layout_height">?android:attr/listPreferredItemHeightSmall</item>
341 <item name="android:textAlignment">viewStart</item>
342 <item name="android:gravity">start|center_vertical</item>
343 <item name="android:paddingStart">@dimen/enhanced_bookmark_drawer_drawable_padding</item>
344 <item name="android:paddingEnd">@dimen/enhanced_bookmark_drawer_drawable_padding</item>
345 <item name="android:singleLine">true</item>
346 <item name="android:textAppearance">?android:attr/textAppearanceLargePopupMenu</item>
347 <item name="android:textSize">14sp</item>
350 <!-- Signin promo dialog-->
351 <style name="SigninPromoDialog" parent="Theme.AppCompat.Light">
352 <item name="android:windowNoTitle">true</item>
353 <item name="android:windowFrame">@null</item>
354 <item name="android:windowIsFloating">true</item>
355 <item name="android:windowContentOverlay">@null</item>
356 <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
357 <item name="android:windowBackground">@android:color/white</item>
358 <item name="android:textColorLink">@color/light_active_color</item>
359 <item name="colorPrimary">@color/light_active_color</item>
360 <item name="colorAccent">@color/light_active_color</item>
363 <!-- Contextual Search styles -->
364 <style name="ContextualSearchTextViewLayout">
365 <item name="android:layout_width">match_parent</item>
366 <item name="android:layout_height">wrap_content</item>
367 <item name="android:layout_gravity">bottom</item>
368 <item name="android:background">#FFF</item>
369 <item name="android:visibility">invisible</item>
370 <!-- 60dp padding minus 7dp for fading edge -->
371 <item name="android:paddingStart">53dp</item>
372 <item name="android:paddingEnd">53dp</item>
374 <style name="ContextualSearchTextView">
375 <item name="android:layout_height">match_parent</item>
376 <item name="android:ellipsize">end</item>
377 <item name="android:singleLine">true</item>
378 <item name="android:textColor">#000</item>
379 <item name="android:textSize">@dimen/contextual_search_text_size</item>
381 <style name="ContextualSearchContextTextView">
382 <item name="android:layout_width">0dp</item>
383 <item name="android:layout_height">match_parent</item>
384 <item name="android:ellipsize">none</item>
385 <item name="android:fadingEdge">horizontal</item>
386 <item name="android:fadingEdgeLength">30dp</item>
387 <item name="android:layout_weight">1</item>
388 <item name="android:requiresFadingEdge">horizontal</item>
389 <item name="android:singleLine">true</item>
390 <item name="android:textColor">#CCC</item>
391 <item name="android:textSize">@dimen/contextual_search_text_size</item>
395 <style name="SnackbarAnimation">
396 <item name="android:windowEnterAnimation">@anim/snackbar_in</item>
397 <item name="android:windowExitAnimation">@anim/snackbar_out</item>
399 <style name="SnackbarAnimationWithKeyboard">
400 <item name="android:windowEnterAnimation">@anim/snackbar_in_with_keyboard</item>
401 <item name="android:windowExitAnimation">@anim/snackbar_out</item>
403 <style name="LocationBarButton">
404 <item name="android:background">@null</item>
406 <style name="ToolbarButton">
407 <item name="android:background">?attr/selectableItemBackground</item>
408 <item name="android:layout_width">48dp</item>
409 <item name="android:layout_height">56dp</item>
410 <item name="android:scaleType">center</item>