am f37ac856: Clean up DeviceDefault style in API Demos

* commit 'f37ac8560aa6b90813df0aa0f4587d25b388dd06':
  Clean up DeviceDefault style in API Demos
This commit is contained in:
Alan Viverette
2014-03-26 21:19:18 +00:00
committed by Android Git Automerger
5 changed files with 55 additions and 25 deletions

View File

@@ -2220,7 +2220,8 @@
</activity>
<activity android:name=".view.Controls9"
android:label="Views/Controls/9. Default Theme">
android:label="Views/Controls/9. Default Theme"
android:theme="@style/ThemeDefault">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.SAMPLE_CODE" />

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
<!--
Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,15 +16,17 @@
-->
<resources>
<!-- For API level 11 or later, the Holo theme is available and we prefer that. -->
<style name="ThemeCurrent" parent="android:Theme.Holo">
</style>
<!-- For API level 11 or later, the Holo theme is available and we prefer that. -->
<style name="ThemeCurrentDialog" parent="android:Theme.Holo.Dialog">
</style>
<style name="ThemeCurrent" parent="@android:Theme.Holo" />
<!-- For API level 11 or later, the Holo theme is available and we prefer that. -->
<style name="ThemeCurrentDialog" parent="@android:Theme.Holo.Dialog" />
<!-- For API level 11 or later, we can use the magical DialogWhenLarge theme. -->
<style name="ThemeDialogWhenLarge" parent="android:style/Theme.Holo.DialogWhenLarge">
</style>
<style name="ThemeDialogWhenLarge" parent="@android:style/Theme.Holo.DialogWhenLarge" />
<!-- For API level 11 or later, the Holo theme is available and we prefer that. -->
<style name="ThemeDefault" parent="@android:style/Theme.Holo" />
</resources>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- For API level 14 or later, the DeviceDefault theme is available and we prefer that. -->
<style name="ThemeDefault" parent="@android:style/Theme.DeviceDefault" />
</resources>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
<!--
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,11 +16,11 @@
-->
<resources>
<drawable name="red">#7f00</drawable>
<drawable name="blue">#770000ff</drawable>
<drawable name="green">#7700ff00</drawable>
<drawable name="yellow">#77ffff00</drawable>
<drawable name="screen_background_black">#ff000000</drawable>
<drawable name="translucent_background">#e0000000</drawable>
<drawable name="transparent_background">#00000000</drawable>
@@ -30,4 +31,8 @@
<color name="solid_yellow">#ffffff00</color>
<color name="purply">#ff884488</color>
<!-- A custom theme that is a variation on the light them with a different
background color. -->
<color name="custom_theme_color">#b0b0ff</color>
</resources>

View File

@@ -15,9 +15,6 @@
-->
<resources>
<!-- A custom theme that is a variation on the light them with a different
background color. -->
<color name="custom_theme_color">#b0b0ff</color>
<style name="CustomTheme" parent="android:Theme.Light">
<item name="android:windowBackground">@color/custom_theme_color</item>
<item name="android:colorBackground">@color/custom_theme_color</item>
@@ -29,8 +26,12 @@
selected when the holographic theme is available, or look at
values-XX/styles.xml for a variation that is selected when the quantum
theme is available. -->
<style name="ThemeCurrent" parent="android:Theme">
</style>
<style name="ThemeCurrent" parent="android:Theme" />
<!-- This is a theme that reflects the default theme used when no theme is
specified by an application or activity. In API 14 and above, this
refers to the DeviceDefault theme. -->
<style name="ThemeDefault" parent="android:Theme" />
<!-- This is a theme that will adjust itself depending on the API version.
The default definition is the safe one, using a theme that has always
@@ -38,20 +39,17 @@
selected when the holographic theme is available, or look at
values-XX/styles.xml for a variation that is selected when the quantum
theme is available. -->
<style name="ThemeCurrentDialog" parent="android:Theme.Dialog">
</style>
<style name="ThemeCurrentDialog" parent="android:Theme.Dialog" />
<!-- Older platforms don't have Theme.Holo.DialogWhenLarge; we will define
our own wrapper theme that uses it only when running on the appropriate
platform version. On older platforms, we always use the generic
fullscreen theme, because they don't support some feature that help
in correctly laying out an activity as a dialog. -->
<style name="ThemeCurrentDialogWhenLarge" parent="android:style/Theme">
</style>
<style name="ThemeCurrentDialogWhenLarge" parent="android:style/Theme" />
<!-- Base application theme is the default theme. -->
<style name="Theme" parent="android:Theme">
</style>
<style name="Theme" parent="android:Theme" />
<!-- Variation on our application theme that forces a plain
text style. -->