diff --git a/docs/html/guide/topics/ui/themes.jd b/docs/html/guide/topics/ui/themes.jd index 57c9f2e32c067..a213bea68a80f 100644 --- a/docs/html/guide/topics/ui/themes.jd +++ b/docs/html/guide/topics/ui/themes.jd @@ -326,36 +326,45 @@ Manifest:
<activity android:theme="@style/CustomTheme"> +Newer versions of Android have additional themes available to applications, -and you may want to use these while running on those platforms while still being +and you might want to use these while running on those platforms while still being compatible with older versions. You can accomplish this through a custom theme -that uses resource selection to switch between different parent themes.
+that uses resource selection to switch between different parent themes, based on the platform +version.For example, here is the declaration for a custom theme which is simply
the standard platforms default light theme. It would go in an XML file under
res/values (typically res/values/styles.xml):
<style name="LightThemeSelector" parent="android:Theme.Light"> + ... </style>-
To have this theme use the newer "holo" theme when the application is running
-on {@link android.os.Build.VERSION_CODES#HONEYCOMB}, you can place another
-declaration for it in a file in res/values-11:
To have this theme use the newer holographic theme when the application is running
+on Android 3.0 (API Level 11) or higher, you can place an alternative
+declaration for the theme in an XML file in res/values-v11, but make the parent theme
+the holographic theme:
<style name="LightThemeSelector" parent="android:Theme.Holo.Light"> + ... </style>
Now use this theme like you would any other, and your application will -automatically switch to the holo theme if running on -{@link android.os.Build.VERSION_CODES#HONEYCOMB} or later.
+automatically switch to the holographic theme if running on Android 3.0 or higher.A list of the standard attributes that you can use in themes can be found at {@link android.R.styleable#Theme R.styleable.Theme}.
+For more information about providing alternative resources, such as themes and layouts, based +on the platform version or other device configurations, see the Providing Resources +document.
+