summaryrefslogtreecommitdiffstats
path: root/docs/html/preview/material/theme.jd
diff options
context:
space:
mode:
authorRicardo Cervera <rcervera@google.com>2014-06-24 21:39:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-24 17:32:43 +0000
commit5f5610caf5a0154630cb900c3c28ae8acf591ce3 (patch)
treedae2fd01a1a05a9cffb1776bba6c7fb61ce4a3a6 /docs/html/preview/material/theme.jd
parent4af882fdf5ca60a9038cd66265ec2723c15a26c5 (diff)
parent6dacb26b07c7a13e245891b688290c50cd8e8a1f (diff)
downloadframeworks_base-5f5610caf5a0154630cb900c3c28ae8acf591ce3.zip
frameworks_base-5f5610caf5a0154630cb900c3c28ae8acf591ce3.tar.gz
frameworks_base-5f5610caf5a0154630cb900c3c28ae8acf591ce3.tar.bz2
Merge "docs: Material L Preview engineering review fixes" into klp-modular-dev
Diffstat (limited to 'docs/html/preview/material/theme.jd')
-rw-r--r--docs/html/preview/material/theme.jd51
1 files changed, 25 insertions, 26 deletions
diff --git a/docs/html/preview/material/theme.jd b/docs/html/preview/material/theme.jd
index b954960..5e4bcdf 100644
--- a/docs/html/preview/material/theme.jd
+++ b/docs/html/preview/material/theme.jd
@@ -8,7 +8,7 @@ page.title=Material Theme
<ol>
<li><a href="#colorpalette">Customize the Colot Palette</a></li>
<li><a href="#statusbar">Customize the Status Bar</a></li>
- <li><a href="#inheritance">Theme Inheritance</a></li>
+ <li><a href="#inheritance">Theme Individual Views</a></li>
</ol>
</div>
</div>
@@ -21,18 +21,18 @@ page.title=Material Theme
<li>Activity transition animations</li>
</ul>
-<p>The Android L Developer Preview lets you easily customize the look of the material theme
-according to your brand identity with a color palette you control. You can tint the app bar and
+<p>You can customize the look of the material theme
+according to your brand identity with a color palette you control. You can tint the action bar and
the status bar using theme attributes, as shown in Figure 1.</p>
-<div style="float:right;margin-left:25px;margin-top:-25px">
+<div style="float:right;margin-left:25px;margin-top:-50px">
<img src="{@docRoot}preview/material/images/ThemeColors.png" style="width:250px"/>
-<p class="img-caption"><strong>Figure 1.</strong> Customizing the material theme.</p>
+<p class="img-caption" style="margin-bottom:0px">
+<strong>Figure 1.</strong> Customizing the material theme.</p>
</div>
-<p>The system widgets have a new design and touch feedback animations. Activity transitions help
-users navigate your app by providing visual continuity. You can customize the color palette,
-the touch feedback animations, and the activity transitions for your app.</p>
+<p>The system widgets have a new design and touch feedback animations. You can customize the
+color palette, the touch feedback animations, and the activity transitions for your app.</p>
<p>The material theme is defined as:</p>
@@ -43,7 +43,7 @@ the touch feedback animations, and the activity transitions for your app.</p>
</ul>
<p>For a list of material styles that you can use, see the API reference for
-<code>android.R.styles</code>.</p>
+<code>android.R.style</code>.</p>
<p class="note">
<strong>Note:</strong> The material theme is only available in the Android L Developer Preview.
@@ -53,8 +53,8 @@ For more information, see <a href="{@docRoot}preview/material/compatibility.html
<h2 id="colorpalette">Customize the Color Palette</h2>
-<p>To customize the theme's base colors to fit your brand, define your custom colors using
-theme attributes when you inherit from the material theme:</p>
+<p style="margin-bottom:30px">To customize the theme's base colors to fit your brand, define
+your custom colors using theme attributes when you inherit from the material theme:</p>
<pre>
&lt;resources>
@@ -63,28 +63,27 @@ theme attributes when you inherit from the material theme:</p>
&lt;!-- Main theme colors -->
&lt;!-- your app's branding color (for the app bar) -->
&lt;item name="android:colorPrimary">@color/primary&lt;/item>
- &lt;!-- darker variant of colorPrimary (for contextual app bars) -->
+ &lt;!-- darker variant of colorPrimary (for status bar, contextual app bars) -->
&lt;item name="android:colorPrimaryDark">@color/primary_dark&lt;/item>
-
- &lt;!-- other theme colors -->
- &lt;item name="android:colorButtonNormal">@color/button_normal&lt;/item>
- &lt;item name="android:windowBackground">@color/wbackground&lt;/item>
+ &lt;!-- theme UI controls like checkboxes and text fields -->
+ &lt;item name="android:colorAccent">@color/accent&lt;/item>
&lt;/style>
&lt;/resources>
</pre>
-<h2 id="statusbar">Customize the Status Bar</h2>
+<h2 id="statusbar">Customize the Status and Navigation Bar</h2>
<p>The material theme lets you easily customize the status bar, so you can specify a
-color which fits your brand and provides enough contrast to show the white status icons. To
+color that fits your brand and provides enough contrast to show the white status icons. To
set a custom color for the status bar, use the <code>android:statusBarColor</code> attribute when
-you extend the material theme.</p>
+you extend the material theme. By default, <code>android:statusBarColor</code> inherits the
+value of <code>android:colorPrimaryDark</code>.</p>
<p>To handle the color of the status bar yourself (for example, by adding a gradient in the
background), set the <code>android:statusBarColor</code> attribute to
-<code>&#64;android:color/transparent</code>. You can also use the
-<code>Window.setStatusBarColor</code> method for animations or fading.</p>
+<code>&#64;android:color/transparent</code> and adjust the window flags as required. You can
+also use the <code>Window.setStatusBarColor</code> method for animations or fading.</p>
<p class="note"><strong>Note:</strong>
The status bar should almost always have a clear delineation from the primary toolbar, except for
@@ -92,9 +91,9 @@ full-bleed imagery cases and when you use a gradient as a protection.
</p>
-<h2 id="inheritance">Theme Inheritance</h3>
+<h2 id="inheritance">Theme Individual Views</h3>
-<p>In the Android L Developer Preview, elements in XML layout definitions can specify the
-<code>android:theme</code> attribute, which references a theme resource. This attribute modifies
-the theme for the element and any elements inflated below it, which is useful to alter theme
-color palettes in a specific portion of an interface.</p> \ No newline at end of file
+<p>Elements in XML layout definitions can specify the <code>android:theme</code> attribute,
+which references a theme resource. This attribute modifies the theme for the element and any
+elements inflated below it, which is useful to alter theme color palettes in a specific portion
+of an interface.</p> \ No newline at end of file