summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2013-08-22 18:58:56 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-08-22 18:58:56 -0700
commitd17619f6df6bef8a4a18e02afb0294f75cbd56de (patch)
tree8fbc47d445d08a8b6bd9c2bc4faebcd788fea78c /docs
parent978ec174fbbbda4a844178f645e83365861a0d4c (diff)
parentcd4e1c463eab530657bead6e79efa3215924f1b0 (diff)
downloadframeworks_base-d17619f6df6bef8a4a18e02afb0294f75cbd56de.zip
frameworks_base-d17619f6df6bef8a4a18e02afb0294f75cbd56de.tar.gz
frameworks_base-d17619f6df6bef8a4a18e02afb0294f75cbd56de.tar.bz2
am cd4e1c46: am f151391b: fix markup errors in action bar styling, add more information about using drawables, move \'managing the activity lifecycle\' down a notch, because it\'s less interesting.
* commit 'cd4e1c463eab530657bead6e79efa3215924f1b0': fix markup errors in action bar styling, add more information about using drawables, move 'managing the activity lifecycle' down a notch, because it's less interesting.
Diffstat (limited to 'docs')
-rw-r--r--docs/html/training/basics/actionbar/adding-buttons.jd16
-rw-r--r--docs/html/training/basics/actionbar/styling.jd36
-rw-r--r--docs/html/training/basics/activity-lifecycle/starting.jd2
-rw-r--r--docs/html/training/basics/supporting-devices/screens.jd4
-rw-r--r--docs/html/training/training_toc.cs48
5 files changed, 60 insertions, 46 deletions
diff --git a/docs/html/training/basics/actionbar/adding-buttons.jd b/docs/html/training/basics/actionbar/adding-buttons.jd
index 5fb0d59..26c9d0e 100644
--- a/docs/html/training/basics/actionbar/adding-buttons.jd
+++ b/docs/html/training/basics/actionbar/adding-buttons.jd
@@ -74,7 +74,21 @@ is available in the action bar, but the
Settings action should always appear in the overflow. (By default, all actions appear in the
overflow, but it's good practice to explicitly declare your design intentions for each action.)
-<p>However, <strong>if your app is using the Support Library</strong> for compatibility on versions
+<p>The {@code icon} attribute requires a resource ID for an
+image. The name that follows {@code &#64;drawable/} must be the name of a bitmap image you've
+saved in your project's {@code res/drawable/} directory. For example,
+{@code "&#64;drawable/ic_action_search"} refers to {@code ic_action_search.png}.
+Likewise, the {@code title} attribute uses a string resource that's defined by an XML
+file in your project's {@code res/values/} directory, as discussed in <a
+href="{@docRoot}training/basics/firstapp/building-ui.html#Strings">Building a Simple User
+Interface</a>.
+
+<p class="note"><strong>Note:</strong> When creating icons and other bitmap images for your app,
+it's important that you provide multiple versions that are each optimized for a different screen
+density. This is discussed more in the lesson about <a
+href="{@docRoot}training/basics/supporting-devices/screens.html">Supporting Different Screens</a>.
+
+<p><strong>If your app is using the Support Library</strong> for compatibility on versions
as low as Android 2.1, the {@code showAsAction} attribute is not available from
the {@code android:} namespace. Instead this attribute is provided by the Support Library
and you must define your own XML namespace and use that namespace as the attribute prefix.
diff --git a/docs/html/training/basics/actionbar/styling.jd b/docs/html/training/basics/actionbar/styling.jd
index a1cc10c..1f76e03 100644
--- a/docs/html/training/basics/actionbar/styling.jd
+++ b/docs/html/training/basics/actionbar/styling.jd
@@ -20,7 +20,7 @@ trainingnavtop=true
<ul>
<li><a href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a></li>
<li><a class="external-link" target="_blank"
- href="http://jgilfelt.github.io/android-actionbarstylegenerator/">Android Action Bar Style
+ href="http://www.actionbarstylegenerator.com">Android Action Bar Style
Generator</a></li>
</ul>
@@ -146,13 +146,13 @@ background like this:</p>
&lt;style name="CustomActionBarTheme"
parent="&#64;style/Theme.Holo.Light.DarkActionBar">
&lt;item name="android:actionBarStyle">&#64;style/MyActionBar&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar styles -->
&lt;style name="MyActionBar"
parent="&#64;style/Widget.Holo.Light.ActionBar.Solid.Inverse">
&lt;item name="android:background">&#64;drawable/actionbar_background&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;/resources>
</pre>
@@ -178,7 +178,7 @@ background like this:</p>
&lt;!-- Support library compatibility -->
&lt;item name="actionBarStyle">&#64;style/MyActionBar&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar styles -->
&lt;style name="MyActionBar"
@@ -187,7 +187,7 @@ background like this:</p>
&lt;!-- Support library compatibility -->
&lt;item name="background">&#64;drawable/actionbar_background&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;/resources>
</pre>
@@ -236,25 +236,25 @@ for each text element:</p>
&lt;item name="android:actionBarStyle">&#64;style/MyActionBar&lt;/item>
&lt;item name="android:actionBarTabTextStyle">&#64;style/MyActionBarTabText&lt;/item>
&lt;item name="android:actionMenuTextColor">&#64;color/actionbar_text&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar styles -->
&lt;style name="MyActionBar"
parent="&#64;style/Widget.Holo.ActionBar">
&lt;item name="android:titleTextStyle">&#64;style/MyActionBarTitleText&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar title text -->
&lt;style name="MyActionBarTitleText"
parent="&#64;style/TextAppearance.Holo.Widget.ActionBar.Title">
&lt;item name="android:textColor">&#64;color/actionbar_text&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar tabs text styles -->
&lt;style name="MyActionBarTabText"
parent="&#64;style/Widget.Holo.ActionBar.TabText">
&lt;item name="android:textColor">&#64;color/actionbar_text&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;/resources>
</pre>
@@ -280,7 +280,7 @@ for each text element:</p>
&lt;item name="actionBarStyle">&#64;style/MyActionBar&lt;/item>
&lt;item name="actionBarTabTextStyle">&#64;style/MyActionBarTabText&lt;/item>
&lt;item name="actionMenuTextColor">&#64;color/actionbar_text&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar styles -->
&lt;style name="MyActionBar"
@@ -289,21 +289,21 @@ for each text element:</p>
&lt;!-- Support library compatibility -->
&lt;item name="titleTextStyle">&#64;style/MyActionBarTitleText&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar title text -->
&lt;style name="MyActionBarTitleText"
parent="&#64;style/TextAppearance.<strong>AppCompat</strong>.Widget.ActionBar.Title">
&lt;item name="android:textColor">&#64;color/actionbar_text&lt;/item>
&lt;!-- The textColor property is backward compatible with the Support Library -->
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar tabs text -->
&lt;style name="MyActionBarTabText"
parent="&#64;style/Widget.<strong>AppCompat</strong>.ActionBar.TabText">
&lt;item name="android:textColor">&#64;color/actionbar_text&lt;/item>
&lt;!-- The textColor property is backward compatible with the Support Library -->
- &lt;style>
+ &lt;/style>
&lt;/resources>
</pre>
@@ -392,14 +392,14 @@ for several different states of an action bar tab:</p>
&lt;style name="CustomActionBarTheme"
parent="&#64;style/Theme.Holo">
&lt;item name="android:actionBarTabStyle">&#64;style/MyActionBarTabs&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar tabs styles -->
&lt;style name="MyActionBarTabs"
parent="&#64;style/Widget.Holo.ActionBar.TabView">
&lt;!-- tab indicator -->
&lt;item name="android:background">&#64;drawable/actionbar_tab_indicator&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;/resources>
</pre>
@@ -420,7 +420,7 @@ for several different states of an action bar tab:</p>
&lt;!-- Support library compatibility -->
&lt;item name="actionBarTabStyle">&#64;style/MyActionBarTabs&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;!-- ActionBar tabs styles -->
&lt;style name="MyActionBarTabs"
@@ -430,7 +430,7 @@ for several different states of an action bar tab:</p>
&lt;!-- Support library compatibility -->
&lt;item name="background">&#64;drawable/actionbar_tab_indicator&lt;/item>
- &lt;style>
+ &lt;/style>
&lt;/resources>
</pre>
@@ -442,7 +442,7 @@ for several different states of an action bar tab:</p>
href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a> guide.</li>
<li>For even more complete styling for the action bar,
try the <a class="external-link" target="_blank"
- href="www://http.actionbarstylegenerator.com">Android Action Bar Style
+ href="http://www.actionbarstylegenerator.com">Android Action Bar Style
Generator</a>.</li>
</ul>
</div> \ No newline at end of file
diff --git a/docs/html/training/basics/activity-lifecycle/starting.jd b/docs/html/training/basics/activity-lifecycle/starting.jd
index dce6e30..9046599 100644
--- a/docs/html/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html/training/basics/activity-lifecycle/starting.jd
@@ -220,7 +220,7 @@ public void onCreate(Bundle savedInstanceState) {
</pre>
<p class="caution"><strong>Caution:</strong> Using the {@link android.os.Build.VERSION#SDK_INT} to
-prevent older system's from executing new APIs works in this way on Android 2.0 (API level
+prevent older systems from executing new APIs works in this way on Android 2.0 (API level
5) and higher only. Older versions will encounter a runtime exception.</p>
<p>Once the {@link android.app.Activity#onCreate onCreate()} finishes execution, the system
diff --git a/docs/html/training/basics/supporting-devices/screens.jd b/docs/html/training/basics/supporting-devices/screens.jd
index 1114f21..e52ee70 100644
--- a/docs/html/training/basics/supporting-devices/screens.jd
+++ b/docs/html/training/basics/supporting-devices/screens.jd
@@ -23,8 +23,8 @@ next.link=platforms.html
<ul>
<li><a href="{@docRoot}training/multiscreen/index.html">Designing for Multiple
Screens</a></li>
- <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a></li>
+ <li><a href="{@docRoot}guide/topics/resources/providing-resources.html">Providing
+ Resources</a></li>
<li><a href="{@docRoot}design/style/iconography.html">Iconography design guide</a></li>
</ul>
</div>
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index c99fc96..40c170e 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -68,27 +68,23 @@ include the action bar on devices running Android 2.1 or higher."
<li class="nav-section">
<div class="nav-section-header">
- <a href="<?cs var:toroot ?>training/basics/activity-lifecycle/index.html"
+ <a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html"
description=
- "How Android activities live and die and how to create
- a seamless user experience by implementing lifecycle callback methods."
- >Managing the Activity Lifecycle</a>
+ "How to build your app with alternative resources that provide an
+ optimized user experience on multiple device form factors using a single APK."
+ >Supporting Different Devices</a>
</div>
<ul>
- <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/starting.html">
- Starting an Activity
- </a>
- </li>
- <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/pausing.html">
- Pausing and Resuming an Activity
+ <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/languages.html">
+ Supporting Different Languages
</a>
</li>
- <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/stopping.html">
- Stopping and Restarting an Activity
+ <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/screens.html">
+ Supporting Different Screens
</a>
</li>
- <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/recreating.html">
- Recreating an Activity
+ <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/platforms.html">
+ Supporting Different Platform Versions
</a>
</li>
</ul>
@@ -96,23 +92,27 @@ include the action bar on devices running Android 2.1 or higher."
<li class="nav-section">
<div class="nav-section-header">
- <a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html"
+ <a href="<?cs var:toroot ?>training/basics/activity-lifecycle/index.html"
description=
- "How to build your app with alternative resources that provide an
- optimized user experience on multiple device form factors using a single APK."
- >Supporting Different Devices</a>
+ "How Android activities live and die and how to create
+ a seamless user experience by implementing lifecycle callback methods."
+ >Managing the Activity Lifecycle</a>
</div>
<ul>
- <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/languages.html">
- Supporting Different Languages
+ <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/starting.html">
+ Starting an Activity
</a>
</li>
- <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/screens.html">
- Supporting Different Screens
+ <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/pausing.html">
+ Pausing and Resuming an Activity
</a>
</li>
- <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/platforms.html">
- Supporting Different Platform Versions
+ <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/stopping.html">
+ Stopping and Restarting an Activity
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/recreating.html">
+ Recreating an Activity
</a>
</li>
</ul>