am f37ac856: Clean up DeviceDefault style in API Demos
* commit 'f37ac8560aa6b90813df0aa0f4587d25b388dd06': Clean up DeviceDefault style in API Demos
This commit is contained in:
@@ -2220,7 +2220,8 @@
|
|||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name=".view.Controls9"
|
<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>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.SAMPLE_CODE" />
|
<category android:name="android.intent.category.SAMPLE_CODE" />
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -15,15 +16,17 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<resources>
|
<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. -->
|
<!-- For API level 11 or later, the Holo theme is available and we prefer that. -->
|
||||||
<style name="ThemeCurrentDialog" parent="android:Theme.Holo.Dialog">
|
<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" />
|
||||||
|
|
||||||
<!-- For API level 11 or later, we can use the magical DialogWhenLarge theme. -->
|
<!-- For API level 11 or later, we can use the magical DialogWhenLarge theme. -->
|
||||||
<style name="ThemeDialogWhenLarge" parent="android:style/Theme.Holo.DialogWhenLarge">
|
<style name="ThemeDialogWhenLarge" parent="@android:style/Theme.Holo.DialogWhenLarge" />
|
||||||
</style>
|
|
||||||
</resources>
|
<!-- For API level 11 or later, the Holo theme is available and we prefer that. -->
|
||||||
|
<style name="ThemeDefault" parent="@android:style/Theme.Holo" />
|
||||||
|
|
||||||
|
</resources>
|
||||||
23
samples/ApiDemos/res/values-v14/styles.xml
Normal file
23
samples/ApiDemos/res/values-v14/styles.xml
Normal 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>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -15,12 +16,12 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<drawable name="red">#7f00</drawable>
|
<drawable name="red">#7f00</drawable>
|
||||||
<drawable name="blue">#770000ff</drawable>
|
<drawable name="blue">#770000ff</drawable>
|
||||||
<drawable name="green">#7700ff00</drawable>
|
<drawable name="green">#7700ff00</drawable>
|
||||||
<drawable name="yellow">#77ffff00</drawable>
|
<drawable name="yellow">#77ffff00</drawable>
|
||||||
|
<drawable name="screen_background_black">#ff000000</drawable>
|
||||||
<drawable name="screen_background_black">#ff000000</drawable>
|
|
||||||
<drawable name="translucent_background">#e0000000</drawable>
|
<drawable name="translucent_background">#e0000000</drawable>
|
||||||
<drawable name="transparent_background">#00000000</drawable>
|
<drawable name="transparent_background">#00000000</drawable>
|
||||||
|
|
||||||
@@ -30,4 +31,8 @@
|
|||||||
<color name="solid_yellow">#ffffff00</color>
|
<color name="solid_yellow">#ffffff00</color>
|
||||||
<color name="purply">#ff884488</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>
|
</resources>
|
||||||
|
|||||||
@@ -15,9 +15,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<resources>
|
<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">
|
<style name="CustomTheme" parent="android:Theme.Light">
|
||||||
<item name="android:windowBackground">@color/custom_theme_color</item>
|
<item name="android:windowBackground">@color/custom_theme_color</item>
|
||||||
<item name="android:colorBackground">@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
|
selected when the holographic theme is available, or look at
|
||||||
values-XX/styles.xml for a variation that is selected when the quantum
|
values-XX/styles.xml for a variation that is selected when the quantum
|
||||||
theme is available. -->
|
theme is available. -->
|
||||||
<style name="ThemeCurrent" parent="android:Theme">
|
<style name="ThemeCurrent" parent="android:Theme" />
|
||||||
</style>
|
|
||||||
|
<!-- 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.
|
<!-- 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
|
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
|
selected when the holographic theme is available, or look at
|
||||||
values-XX/styles.xml for a variation that is selected when the quantum
|
values-XX/styles.xml for a variation that is selected when the quantum
|
||||||
theme is available. -->
|
theme is available. -->
|
||||||
<style name="ThemeCurrentDialog" parent="android:Theme.Dialog">
|
<style name="ThemeCurrentDialog" parent="android:Theme.Dialog" />
|
||||||
</style>
|
|
||||||
|
|
||||||
<!-- Older platforms don't have Theme.Holo.DialogWhenLarge; we will define
|
<!-- Older platforms don't have Theme.Holo.DialogWhenLarge; we will define
|
||||||
our own wrapper theme that uses it only when running on the appropriate
|
our own wrapper theme that uses it only when running on the appropriate
|
||||||
platform version. On older platforms, we always use the generic
|
platform version. On older platforms, we always use the generic
|
||||||
fullscreen theme, because they don't support some feature that help
|
fullscreen theme, because they don't support some feature that help
|
||||||
in correctly laying out an activity as a dialog. -->
|
in correctly laying out an activity as a dialog. -->
|
||||||
<style name="ThemeCurrentDialogWhenLarge" parent="android:style/Theme">
|
<style name="ThemeCurrentDialogWhenLarge" parent="android:style/Theme" />
|
||||||
</style>
|
|
||||||
|
|
||||||
<!-- Base application theme is the default theme. -->
|
<!-- Base application theme is the default theme. -->
|
||||||
<style name="Theme" parent="android:Theme">
|
<style name="Theme" parent="android:Theme" />
|
||||||
</style>
|
|
||||||
|
|
||||||
<!-- Variation on our application theme that forces a plain
|
<!-- Variation on our application theme that forces a plain
|
||||||
text style. -->
|
text style. -->
|
||||||
|
|||||||
Reference in New Issue
Block a user