themes.xml revision b5537c452271634b6ff3981b0624fa65384abd5b
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2006 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7  
8          http://www.apache.org/licenses/LICENSE-2.0
9  
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<resources>
18    <!-- The default system theme. This is the theme used for activities
19         that have not explicitly set their own theme.
20         
21         <p>You can count on this being a dark
22         background with light text on top, but should try to make no
23         other assumptions about its appearance. In particular, the text
24         inside of widgets using this theme may be completely different,
25         with the widget container being a light color and the text on top
26         of it a dark color.
27    -->
28    <style name="Theme">
29    
30        <item name="colorForeground">@android:color/bright_foreground_dark</item>
31        <item name="colorForegroundInverse">@android:color/bright_foreground_dark_inverse</item>
32        <item name="colorBackground">@android:color/background_dark</item>
33        <item name="disabledAlpha">0.5</item>
34        <item name="backgroundDimAmount">0.6</item>
35
36        <!-- Text styles -->
37        <item name="textAppearance">@android:style/TextAppearance</item>
38        <item name="textAppearanceInverse">@android:style/TextAppearance.Inverse</item>
39
40        <item name="textColorPrimary">@android:color/primary_text_dark</item>
41        <item name="textColorSecondary">@android:color/secondary_text_dark</item>
42        <item name="textColorTertiary">@android:color/tertiary_text_dark</item>
43        <item name="textColorPrimaryInverse">@android:color/primary_text_light</item>
44        <item name="textColorSecondaryInverse">@android:color/secondary_text_light</item>
45        <item name="textColorTertiaryInverse">@android:color/tertiary_text_light</item>
46        <item name="textColorPrimaryDisableOnly">@android:color/primary_text_dark_disable_only</item>
47        <item name="textColorPrimaryNoDisable">@android:color/primary_text_dark_nodisable</item>
48        <item name="textColorSecondaryNoDisable">@android:color/secondary_text_dark_nodisable</item>
49        <item name="textColorPrimaryInverseNoDisable">@android:color/primary_text_light_nodisable</item>
50        <item name="textColorSecondaryInverseNoDisable">@android:color/secondary_text_light_nodisable</item>
51        <item name="textColorHint">@android:color/hint_foreground_dark</item>
52        <item name="textColorHintInverse">@android:color/hint_foreground_light</item>
53        <item name="textColorSearchUrl">@android:color/search_url_text</item>
54
55        <item name="textAppearanceLarge">@android:style/TextAppearance.Large</item>
56        <item name="textAppearanceMedium">@android:style/TextAppearance.Medium</item>
57        <item name="textAppearanceSmall">@android:style/TextAppearance.Small</item>
58        <item name="textAppearanceLargeInverse">@android:style/TextAppearance.Large.Inverse</item>
59        <item name="textAppearanceMediumInverse">@android:style/TextAppearance.Medium.Inverse</item>
60        <item name="textAppearanceSmallInverse">@android:style/TextAppearance.Small.Inverse</item>
61
62        <!-- @hide -->
63        <item name="textAppearanceSearchResultTitle">@android:style/TextAppearance.SearchResult.Title</item>
64        
65        <!-- @hide -->
66        <item name="textAppearanceSearchResultSubtitle">@android:style/TextAppearance.SearchResult.Subtitle</item>
67        
68        <item name="textAppearanceButton">@android:style/TextAppearance.Widget.Button</item>
69        
70        <item name="candidatesTextStyleSpans">@android:string/candidates_style</item>
71        
72        <item name="textCheckMark">@android:drawable/indicator_check_mark_dark</item>
73        <item name="textCheckMarkInverse">@android:drawable/indicator_check_mark_light</item>
74
75        <!-- Button styles -->
76        <item name="buttonStyle">@android:style/Widget.Button</item>
77
78        <item name="buttonStyleSmall">@android:style/Widget.Button.Small</item>
79        <item name="buttonStyleInset">@android:style/Widget.Button.Inset</item>
80
81        <item name="buttonStyleToggle">@android:style/Widget.Button.Toggle</item>
82
83        <!-- List attributes -->
84        <item name="listPreferredItemHeight">64dip</item>
85        <!-- @hide -->
86        <item name="searchResultListItemHeight">58dip</item>
87        <item name="listDivider">@drawable/divider_horizontal_dark</item>
88        <item name="listSeparatorTextViewStyle">@android:style/Widget.TextView.ListSeparator</item>   
89        
90		<item name="listChoiceIndicatorSingle">@android:drawable/btn_radio</item>
91    	<item name="listChoiceIndicatorMultiple">@android:drawable/btn_check</item>    
92
93        <item name="expandableListPreferredItemPaddingLeft">40dip</item>
94        <item name="expandableListPreferredChildPaddingLeft">
95                ?android:attr/expandableListPreferredItemPaddingLeft</item>
96
97        <item name="expandableListPreferredItemIndicatorLeft">3dip</item>
98        <item name="expandableListPreferredItemIndicatorRight">33dip</item>
99        <item name="expandableListPreferredChildIndicatorLeft">
100                ?android:attr/expandableListPreferredItemIndicatorLeft</item>
101        <item name="expandableListPreferredChildIndicatorRight">
102                ?android:attr/expandableListPreferredItemIndicatorRight</item>
103
104        <!-- Gallery attributes -->
105        <item name="galleryItemBackground">@android:drawable/gallery_item_background</item>
106        
107        <!-- Window attributes -->
108        <item name="windowBackground">@android:drawable/screen_background_dark</item>
109        <item name="windowFrame">@null</item>
110        <item name="windowNoTitle">false</item>
111        <item name="windowFullscreen">false</item>
112        <item name="windowIsFloating">false</item>
113        <item name="windowContentOverlay">@android:drawable/title_bar_shadow</item>
114        <item name="windowTitleStyle">@android:style/WindowTitle</item>
115        <item name="windowTitleSize">25dip</item>
116        <item name="windowTitleBackgroundStyle">@android:style/WindowTitleBackground</item>
117        <item name="android:windowAnimationStyle">@android:style/Animation.Activity</item>
118        <item name="android:windowSoftInputMode">stateUnspecified|adjustUnspecified</item>
119
120        <!-- Dialog attributes -->
121        <item name="alertDialogStyle">@android:style/AlertDialog</item>
122        
123        <!-- Panel attributes -->
124        <item name="panelBackground">@android:drawable/menu_background</item>
125        <item name="panelFullBackground">@android:drawable/menu_background_fill_parent_width</item>
126        <item name="panelColorBackground">#fff</item>
127        <item name="panelColorForeground">?android:attr/textColorPrimaryInverse</item>
128        <item name="panelTextAppearance">?android:attr/textAppearanceInverse</item>
129
130        <!-- Scrollbar attributes -->
131        <item name="scrollbarSize">10dip</item>
132        <item name="scrollbarThumbHorizontal">@android:drawable/scrollbar_handle_horizontal</item>
133        <item name="scrollbarThumbVertical">@android:drawable/scrollbar_handle_vertical</item>
134        <item name="scrollbarTrackHorizontal">@null</item>
135        <item name="scrollbarTrackVertical">@null</item>
136
137        <!-- Widget styles -->
138        <item name="absListViewStyle">@android:style/Widget.AbsListView</item>
139        <item name="autoCompleteTextViewStyle">@android:style/Widget.AutoCompleteTextView</item>        
140        <item name="checkboxStyle">@android:style/Widget.CompoundButton.CheckBox</item>
141        <item name="dropDownListViewStyle">@android:style/Widget.ListView.DropDown</item>
142        <item name="editTextStyle">@android:style/Widget.EditText</item>
143        <item name="expandableListViewStyle">@android:style/Widget.ExpandableListView</item>
144        <item name="galleryStyle">@android:style/Widget.Gallery</item>
145        <item name="gestureOverlayViewStyle">@android:style/Widget.GestureOverlayView</item>
146        <item name="gridViewStyle">@android:style/Widget.GridView</item>
147        <item name="imageButtonStyle">@android:style/Widget.ImageButton</item>
148        <item name="imageWellStyle">@android:style/Widget.ImageWell</item>
149        <item name="listViewStyle">@android:style/Widget.ListView</item>
150        <item name="listViewWhiteStyle">@android:style/Widget.ListView.White</item>
151        <item name="popupWindowStyle">@android:style/Widget.PopupWindow</item>
152        <item name="progressBarStyle">@android:style/Widget.ProgressBar</item>
153        <item name="progressBarStyleHorizontal">@android:style/Widget.ProgressBar.Horizontal</item>
154        <item name="progressBarStyleSmall">@android:style/Widget.ProgressBar.Small</item>
155        <item name="progressBarStyleSmallTitle">@android:style/Widget.ProgressBar.Small.Title</item>
156        <item name="progressBarStyleLarge">@android:style/Widget.ProgressBar.Large</item>
157        <item name="progressBarStyleInverse">@android:style/Widget.ProgressBar.Inverse</item>
158		<item name="progressBarStyleSmallInverse">@android:style/Widget.ProgressBar.Small.Inverse</item>
159	    <item name="progressBarStyleLargeInverse">@android:style/Widget.ProgressBar.Large.Inverse</item> 
160        <item name="seekBarStyle">@android:style/Widget.SeekBar</item>
161        <item name="ratingBarStyle">@android:style/Widget.RatingBar</item>
162        <item name="ratingBarStyleIndicator">@android:style/Widget.RatingBar.Indicator</item>
163        <item name="ratingBarStyleSmall">@android:style/Widget.RatingBar.Small</item>
164        <item name="radioButtonStyle">@android:style/Widget.CompoundButton.RadioButton</item>
165        <item name="scrollViewStyle">@android:style/Widget.ScrollView</item>
166        <item name="horizontalScrollViewStyle">@android:style/Widget.HorizontalScrollView</item>
167        <item name="spinnerStyle">@android:style/Widget.Spinner</item>
168        <item name="starStyle">@android:style/Widget.CompoundButton.Star</item>
169        <item name="tabWidgetStyle">@android:style/Widget.TabWidget</item>
170        <item name="textViewStyle">@android:style/Widget.TextView</item>
171        <item name="webViewStyle">@android:style/Widget.WebView</item>
172        <item name="dropDownItemStyle">@android:style/Widget.DropDownItem</item>
173        <item name="spinnerDropDownItemStyle">@android:style/Widget.DropDownItem.Spinner</item>
174        <item name="spinnerItemStyle">@android:style/Widget.TextView.SpinnerItem</item>
175        <item name="dropDownHintAppearance">@android:style/TextAppearance.Widget.DropDownHint</item>
176        <item name="keyboardViewStyle">@android:style/Widget.KeyboardView</item>
177        
178        <!-- Preference styles -->
179        <item name="preferenceScreenStyle">@android:style/Preference.PreferenceScreen</item>
180        <item name="preferenceCategoryStyle">@android:style/Preference.Category</item>
181        <item name="preferenceStyle">@android:style/Preference</item>
182        <item name="preferenceInformationStyle">@android:style/Preference.Information</item>
183        <item name="checkBoxPreferenceStyle">@android:style/Preference.CheckBoxPreference</item>
184        <item name="yesNoPreferenceStyle">@android:style/Preference.DialogPreference.YesNoPreference</item>
185        <item name="dialogPreferenceStyle">@android:style/Preference.DialogPreference</item>
186        <item name="editTextPreferenceStyle">@android:style/Preference.DialogPreference.EditTextPreference</item>
187        <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item>
188        <item name="preferenceLayoutChild">@android:layout/preference_child</item>
189
190        <!-- Search widget styles -->
191        <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item>
192    </style>
193    
194    <!-- Variant of the default (dark) theme with no title bar -->
195    <style name="Theme.NoTitleBar">
196        <item name="android:windowNoTitle">true</item>
197    </style>
198    
199    <!-- Variant of the default (dark) theme that has no title bar and
200         fills the entire screen -->
201    <style name="Theme.NoTitleBar.Fullscreen">
202        <item name="android:windowFullscreen">true</item>
203        <item name="android:windowContentOverlay">@null</item>
204    </style>
205    
206    <!-- Theme for a light background with dark text on top.  Set your activity
207         to this theme if you would like such an appearance.  As with the
208         default theme, you should try to assume little more than that the
209         background will be a light color. -->
210    <style name="Theme.Light">
211        <item name="windowBackground">@drawable/screen_background_light</item>
212        <item name="colorBackground">@android:color/background_light</item>
213        <item name="colorForeground">@color/bright_foreground_light</item>
214        <item name="colorForegroundInverse">@android:color/bright_foreground_light_inverse</item>
215
216        <item name="textColorPrimary">@android:color/primary_text_light</item>
217        <item name="textColorSecondary">@android:color/secondary_text_light</item>
218        <item name="textColorTertiary">@android:color/tertiary_text_light</item>
219        <item name="textColorPrimaryInverse">@android:color/primary_text_dark</item>
220        <item name="textColorSecondaryInverse">@android:color/secondary_text_dark</item>
221        <item name="textColorTertiaryInverse">@android:color/tertiary_text_dark</item>
222        <item name="textColorPrimaryDisableOnly">@android:color/primary_text_light_disable_only</item>
223        <item name="textColorPrimaryNoDisable">@android:color/primary_text_light_nodisable</item>
224        <item name="textColorSecondaryNoDisable">@android:color/secondary_text_light_nodisable</item>
225        <item name="textColorPrimaryInverseNoDisable">@android:color/primary_text_dark_nodisable</item>
226        <item name="textColorSecondaryInverseNoDisable">@android:color/secondary_text_dark_nodisable</item>
227        <item name="textColorHint">@android:color/hint_foreground_light</item>
228        <item name="textColorHintInverse">@android:color/hint_foreground_dark</item>
229        
230        <item name="popupWindowStyle">@android:style/Widget.PopupWindow</item>
231        
232        <item name="textCheckMark">@android:drawable/indicator_check_mark_light</item>
233        <item name="textCheckMarkInverse">@android:drawable/indicator_check_mark_dark</item>
234
235        <item name="gestureOverlayViewStyle">@android:style/Widget.GestureOverlayView.White</item>
236        <item name="listViewStyle">@android:style/Widget.ListView.White</item>
237        <item name="listDivider">@drawable/divider_horizontal_bright</item>
238        <item name="listSeparatorTextViewStyle">@android:style/Widget.TextView.ListSeparator.White</item>
239        
240        <item name="progressBarStyle">@android:style/Widget.ProgressBar.Inverse</item>
241		<item name="progressBarStyleSmall">@android:style/Widget.ProgressBar.Small.Inverse</item>
242		<item name="progressBarStyleLarge">@android:style/Widget.ProgressBar.Large.Inverse</item>
243		<item name="progressBarStyleInverse">@android:style/Widget.ProgressBar</item>
244		<item name="progressBarStyleSmallInverse">@android:style/Widget.ProgressBar.Small</item>
245		<item name="progressBarStyleLargeInverse">@android:style/Widget.ProgressBar.Large</item> 
246    </style>
247    
248    <!-- Variant of the light theme with no title bar -->
249    <style name="Theme.Light.NoTitleBar">
250        <item name="android:windowNoTitle">true</item>
251    </style>
252
253    <!-- Variant of the light theme that has no title bar and
254         fills the entire screen -->
255    <style name="Theme.Light.NoTitleBar.Fullscreen">
256        <item name="android:windowFullscreen">true</item>
257        <item name="android:windowContentOverlay">@null</item>
258    </style>
259    
260    <!-- Special variation on the default theme that ensures the background is
261         completely black.  This is useful for things like image viewers and
262         media players.   If you want the normal (dark background) theme
263         do <em>not</em> use this, use {@link #Theme}. -->
264    <style name="Theme.Black">
265        <item name="android:windowBackground">@android:color/black</item>
266        <item name="android:colorBackground">@android:color/black</item>
267    </style>
268    
269    <!-- Variant of the black theme with no title bar -->
270    <style name="Theme.Black.NoTitleBar">
271        <item name="android:windowNoTitle">true</item>
272    </style>
273
274    <!-- Variant of the black theme that has no title bar and
275         fills the entire screen -->
276    <style name="Theme.Black.NoTitleBar.Fullscreen">
277        <item name="android:windowFullscreen">true</item>
278        <item name="android:windowContentOverlay">@null</item>
279    </style>
280    
281    <!-- Default theme for translucent activities, that is windows that allow you
282         to see through them to the windows behind.  This sets up the translucent
283         flag and appropriate animations for your windows.  -->
284    <style name="Theme.Translucent">
285        <item name="android:windowBackground">@android:color/transparent</item>
286        <item name="android:windowIsTranslucent">true</item>
287        <item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item>
288    </style>
289
290    <!-- Variant of the translucent theme with no title bar -->
291    <style name="Theme.Translucent.NoTitleBar">
292        <item name="android:windowNoTitle">true</item>
293    </style>
294
295    <!-- Variant of the translucent theme that has no title bar and
296         fills the entire screen -->
297    <style name="Theme.Translucent.NoTitleBar.Fullscreen">
298        <item name="android:windowFullscreen">true</item>
299        <item name="android:windowContentOverlay">@null</item>
300    </style>
301    
302    <!-- Default theme for activities that don't actually display a UI; that
303         is, they finish themselves before being resumed.  -->
304    <style name="Theme.NoDisplay">
305        <item name="android:windowBackground">@null</item>
306        <item name="android:windowContentOverlay">@null</item>
307        <item name="android:windowIsTranslucent">false</item>
308        <item name="android:windowAnimationStyle">@null</item>
309        <item name="android:windowDisablePreview">true</item>
310        <item name="android:windowNoDisplay">true</item>
311    </style>
312
313    <!-- Default theme for dialog windows and activities, which is used by the
314         {@link android.app.Dialog} class.  This changes the window to be
315         floating (not fill the entire screen), and puts a frame around its
316         contents.  You can set this theme on an activity if you would like to
317         make an activity that looks like a Dialog. -->
318    <style name="Theme.Dialog">
319        <item name="android:windowFrame">@null</item>
320        <item name="android:windowTitleStyle">@android:style/DialogWindowTitle</item>
321        <item name="android:windowBackground">@android:drawable/panel_background</item>
322        <item name="android:windowIsFloating">true</item>
323        <item name="android:windowContentOverlay">@null</item>
324        <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
325        <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
326    </style>
327
328    <!-- Default theme for alert dialog windows, which is used by the
329         {@link android.app.AlertDialog} class.  This is basically a dialog
330         but sets the background to empty so it can do two-tone backgrounds. -->
331    <style name="Theme.Dialog.Alert">
332        <item name="windowBackground">@android:color/transparent</item>
333        <item name="windowTitleStyle">@android:style/DialogWindowTitle</item>
334        <item name="windowIsFloating">true</item>
335        <item name="windowContentOverlay">@null</item>
336    </style>
337    
338    <!-- Default dark theme for panel windows.  This removes all extraneous
339         window decorations, so you basically have an empty rectangle in which
340         to place your content.  It makes the window floating, with a transparent
341         background, and turns off dimming behind the window. -->
342    <style name="Theme.Panel">
343        <item name="android:windowBackground">@android:color/transparent</item>
344        <item name="android:windowFrame">@null</item>
345        <item name="android:windowContentOverlay">@null</item>
346        <item name="android:windowIsFloating">true</item>
347        <item name="android:backgroundDimEnabled">false</item>
348        <item name="android:windowIsTranslucent">true</item>
349        <item name="android:windowNoTitle">true</item>
350    </style>
351
352    <!-- Default light theme for panel windows.  This removes all extraneous
353         window decorations, so you basically have an empty rectangle in which
354         to place your content.  It makes the window floating, with a transparent
355         background, and turns off dimming behind the window. -->
356    <style name="Theme.Light.Panel">
357        <item name="android:windowBackground">@android:color/transparent</item>
358        <item name="android:windowFrame">@null</item>
359        <item name="android:windowContentOverlay">@null</item>
360        <item name="android:windowIsFloating">true</item>
361        <item name="android:backgroundDimEnabled">false</item>
362        <item name="android:windowIsTranslucent">true</item>
363        <item name="android:windowNoTitle">true</item>
364    </style>
365
366    <!-- Default theme for input methods, which is used by the
367         {@link android.inputmethodservice.InputMethodService} class.
368         this inherits from Theme.NoTitleBar, but makes the background
369         transparent, the window floating and translucent, and ensures that
370         it does not dim the UI behind it.  This also configures the window
371         with the standard IME animations and visuals. -->
372    <style name="Theme.InputMethod" parent="Theme.Panel">
373        <item name="android:windowAnimationStyle">@android:style/Animation.InputMethod</item>
374        <item name="android:imeFullscreenBackground">@android:drawable/input_method_fullscreen_background</item>
375        <item name="android:imeExtractEnterAnimation">@android:anim/input_method_extract_enter</item>
376        <item name="android:imeExtractExitAnimation">@android:anim/input_method_extract_exit</item>
377    </style>
378
379    <!-- Theme for the search input bar. -->
380    <style name="Theme.SearchBar" parent="Theme.Panel">
381        <item name="android:backgroundDimEnabled">true</item>
382        <item name="windowContentOverlay">@null</item>        
383    </style>
384    
385    <!-- Theme for the search input bar when doing global search. The only
386         difference from non-global search is that we do not dim the background. -->
387    <style name="Theme.GlobalSearchBar" parent="Theme.Panel">
388        <item name="windowContentOverlay">@null</item>
389    </style>
390
391    <!-- Menu Themes -->
392    <eat-comment />
393
394    <style name="Theme.IconMenu">
395        <!-- Menu/item attributes -->
396        <item name="android:itemTextAppearance">@android:style/TextAppearance.Widget.IconMenu.Item</item>
397        <item name="android:itemBackground">@android:drawable/menu_selector</item>
398        <item name="android:itemIconDisabledAlpha">?android:attr/disabledAlpha</item>
399        <item name="android:horizontalDivider">@android:drawable/divider_horizontal_bright</item>
400        <item name="android:verticalDivider">@android:drawable/divider_vertical_bright</item>
401        <item name="android:windowAnimationStyle">@android:style/Animation.OptionsPanel</item>
402        <item name="android:moreIcon">@android:drawable/ic_menu_more</item>
403        <item name="android:background">@null</item>
404    </style>
405
406    <style name="Theme.ExpandedMenu">
407        <!-- Menu/item attributes -->
408        <item name="android:itemTextAppearance">?android:attr/textAppearanceLargeInverse</item>
409        <item name="android:listViewStyle">@android:style/Widget.ListView.Menu</item>
410        <item name="android:windowAnimationStyle">@android:style/Animation.OptionsPanel</item>
411        <item name="android:background">@null</item>
412    </style>
413
414    <!-- @hide -->
415    <style name="Theme.Dialog.AppError">
416        <item name="windowFrame">@null</item>
417        <item name="windowTitleStyle">@android:style/DialogWindowTitle</item>
418        <item name="windowBackground">@android:color/transparent</item>
419        <item name="windowIsFloating">true</item>
420        <item name="windowContentOverlay">@null</item>
421        <item name="textAppearance">@style/TextAppearance.Theme.Dialog.AppError</item>
422    </style>
423</resources>
424