am 5dc7ac74: am a7b56a20: am e249763d: small update to Toast guide, flatten sidenav for notifications/toasts, new screenshots for notifications
* commit '5dc7ac745300fb043267a0c9235244a115507c51':
small update to Toast guide, flatten sidenav for notifications/toasts, new screenshots for notifications
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index e812ccb..46c4398 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -191,28 +191,21 @@
<li><a href="<?cs var:toroot ?>guide/topics/ui/menus.html">
<span class="en">Menus</span></span>
</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/dialogs.html">
- <span class="en">Dialogs</span>
- </a></li>
<li><a href="<?cs var:toroot ?>guide/topics/ui/actionbar.html">
<span class="en">Action Bar</span>
</a></li>
<li><a href="<?cs var:toroot ?>guide/topics/ui/settings.html">
<span class="en">Settings</span>
</a></li>
- <li class="nav-section">
- <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/index.html">
- <span class="en">Notifications</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/toasts.html">
- <span class="en">Toast Notifications</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/notifications.html">
- <span class="en">Status Notifications</span>
- </a></li>
- </ul>
- </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/dialogs.html">
+ <span class="en">Dialogs</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/notifications.html">
+ <span class="en">Notifications</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/toasts.html">
+ <span class="en">Toasts</span>
+ </a></li>
<li class="nav-section">
<div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/search/index.html">
<span class="en">Search</span>
diff --git a/docs/html/guide/topics/ui/notifiers/notifications.jd b/docs/html/guide/topics/ui/notifiers/notifications.jd
index fbff532..2de6260 100644
--- a/docs/html/guide/topics/ui/notifiers/notifications.jd
+++ b/docs/html/guide/topics/ui/notifiers/notifications.jd
@@ -4,26 +4,43 @@
<div id="qv-wrapper">
<div id="qv">
<h2>In this document</h2>
+<ol>
+ <li><a href="#NotificationUI">Notification Display Elements</a>
<ol>
- <li>
- <a href="#NotificationUI">Notification Display Elements</a>
- </li>
- <li>
- <a href="#CreateNotification">Creating a Notification</a>
- </li>
- <li>
- <a href="#Managing">Managing Notifications</a>
- </li>
- <li>
- <a href="#NotificationResponse">Preserving Navigation when Starting an Activity</a>
- </li>
- <li>
- <a href="#Progress">Displaying Progress in a Notification</a>
- </li>
- <li>
- <a href="#CustomNotification">Custom Notification Layouts</a>
- </li>
+ <li><a href="#NormalNotify">Normal view</a></li>
+ <li><a href="#BigNotify">Big view</a></li>
</ol>
+ </li>
+ <li><a href="#CreateNotification">Creating a Notification</a>
+ <ol>
+ <li><a href="#Required">Required notification contents</a></li>
+ <li><a href="#Optional">Optional notification contents and settings</a></li>
+ <li><a href="#Actions">Notification actions</a></li>
+ <li><a href="#SimpleNotification">Creating a simple notification</a></li>
+ <li><a href="#ApplyStyle">Applying a big view style to a notification</a></li>
+ </ol>
+ </li>
+ <li><a href="#Managing">Managing Notifications</a>
+ <ol>
+ <li><a href="#Updating">Updating notifications</a></li>
+ <li><a href="#Removing">Removing notifications</a></li>
+ </ol>
+ </li>
+ <li><a href="#NotificationResponse">Preserving Navigation when Starting an Activity</a>
+ <ol>
+ <li><a href="#DirectEntry">Setting up a regular activity PendingIntent</a></li>
+ <li><a href="#ExtendedNotification">Setting up a special activity PendingIntent</a></li>
+ </ol>
+ </li>
+ <li><a href="#Progress">Displaying Progress in a Notification</a>
+ <ol>
+ <li><a href="#FixedProgress">Displaying a fixed-duration progress indicator</a></li>
+ <li><a href="#ActivityIndicator">Displaying a continuing activity indicator</a></li>
+ </ol>
+ </li>
+ <li><a href="#CustomNotification">Custom Notification Layouts</a></li>
+</ol>
+
<h2>Key classes</h2>
<ol>
<li>{@link android.app.NotificationManager}</li>
@@ -54,13 +71,12 @@
<img
id="figure1"
src="{@docRoot}images/ui/notifications/iconic_notification.png"
- height="32"
- alt="" />
+ height="120" alt="" />
<p class="img-caption">
<strong>Figure 1.</strong> Notifications in the notification area.
</p>
<img id="figure2" src="{@docRoot}images/ui/notifications/normal_notification.png"
- height="240" alt="" />
+ height="293" alt="" />
<p class="img-caption">
<strong>Figure 2.</strong> Notifications in the notification drawer.
</p>
@@ -98,7 +114,7 @@
<img
src="{@docRoot}images/ui/notifications/normal_notification_callouts.png"
alt=""
- height="204"
+ height="153"
id="figure3" />
<p class="img-caption">
<strong>Figure 3.</strong> Notification in normal view.
diff --git a/docs/html/guide/topics/ui/notifiers/toasts.jd b/docs/html/guide/topics/ui/notifiers/toasts.jd
index 1a1fb1f..92c146a 100644
--- a/docs/html/guide/topics/ui/notifiers/toasts.jd
+++ b/docs/html/guide/topics/ui/notifiers/toasts.jd
@@ -1,17 +1,8 @@
-page.title=Toast Notifications
-parent.title=Notifications
-parent.link=index.html
+page.title=Toasts
@jd:body
<div id="qv-wrapper">
- <div id="qv">
- <h2>Quickview</h2>
- <ol>
- <li>A toast is a message that appears on the surface of the screen for a moment, but it
-does not take focus (or pause the current activity), so it cannot accept user input</li>
- <li>You can customize the toast layout to include images</li>
- </ol>
-
+ <div id="qv">
<h2>In this document</h2>
<ol>
<li><a href="#Basics">The Basics</a></li>
@@ -26,22 +17,17 @@
</div>
</div>
-<p>A toast notification is a message that pops up on the surface of the window.
-It only fills the amount of space required for the message and the user's current
-activity remains visible and interactive. The notification automatically fades in and
-out, and does not accept interaction events.</p>
+<p>A toast provides simple feedback about an operation in a small popup.
+It only fills the amount of space required for the message and the current
+activity remains visible and interactive.
+For example, navigating away from an email before you send it triggers a
+"Draft saved" toast to let you know that you can continue editing later.
+Toasts automatically disappear after a timeout.</p>
-<p>The screenshot below shows an example toast notification from the Alarm application.
-Once an alarm is turned on, a toast is displayed to assure you that the
-alarm was set.</p>
<img src="{@docRoot}images/toast.png" alt="" />
-<p>A toast can be created and displayed from an {@link android.app.Activity} or
-{@link android.app.Service}. If you create a toast notification from a Service, it
-appears in front of the Activity currently in focus.</p>
-
-<p>If user response to the notification is required, consider using a
-<a href="notifications.html">Status Bar Notification</a>.</p>
+<p>If user response to a status message is required, consider instead using a
+<a href="{@docRoot}guide/topics/ui/notifiers/notifications.html">Notification</a>.</p>
<h2 id="Basics">The Basics</h2>
@@ -90,8 +76,6 @@
<h2 id="CustomToastView">Creating a Custom Toast View</h2>
-<img src="{@docRoot}images/custom_toast.png" alt="" style="float:right" />
-
<p>If a simple text message isn't enough, you can create a customized layout for your
toast notification. To create a custom layout, define a View layout,
in XML or in your application code, and pass the root {@link android.view.View} object
@@ -105,17 +89,17 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:padding="10dp"
+ android:padding="8dp"
android:background="#DAAA"
>
- <ImageView android:id="@+id/image"
+ <ImageView android:src="@drawable/droid"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_marginRight="10dp"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="8dp"
/>
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="wrap_content"
android:textColor="#FFF"
/>
</LinearLayout>
@@ -126,13 +110,11 @@
<pre>
LayoutInflater inflater = getLayoutInflater();
-View layout = inflater.inflate(R.layout.toast_layout,
+View layout = inflater.inflate(R.layout.custom_toast,
(ViewGroup) findViewById(R.id.toast_layout_root));
-ImageView image = (ImageView) layout.findViewById(R.id.image);
-image.setImageResource(R.drawable.android);
TextView text = (TextView) layout.findViewById(R.id.text);
-text.setText("Hello! This is a custom toast!");
+text.setText("This is a custom toast");
Toast toast = new Toast(getApplicationContext());
toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
diff --git a/docs/html/images/toast.png b/docs/html/images/toast.png
index 223048a..b4c709a 100644
--- a/docs/html/images/toast.png
+++ b/docs/html/images/toast.png
Binary files differ
diff --git a/docs/html/images/ui/notifications/iconic_notification.png b/docs/html/images/ui/notifications/iconic_notification.png
index 4cabfdb..e72fe4e 100644
--- a/docs/html/images/ui/notifications/iconic_notification.png
+++ b/docs/html/images/ui/notifications/iconic_notification.png
Binary files differ
diff --git a/docs/html/images/ui/notifications/normal_notification.png b/docs/html/images/ui/notifications/normal_notification.png
index 3cf0231..9bea5fb 100644
--- a/docs/html/images/ui/notifications/normal_notification.png
+++ b/docs/html/images/ui/notifications/normal_notification.png
Binary files differ
diff --git a/docs/html/images/ui/notifications/normal_notification_callouts.png b/docs/html/images/ui/notifications/normal_notification_callouts.png
index db57daf..6880e90 100644
--- a/docs/html/images/ui/notifications/normal_notification_callouts.png
+++ b/docs/html/images/ui/notifications/normal_notification_callouts.png
Binary files differ