diff options
author | Robert Ly <robertly@google.com> | 2014-05-19 18:03:19 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-19 18:03:19 +0000 |
commit | 3257984e55434cea1a058e9829460d0db9808b0c (patch) | |
tree | 0f07aae3a301deedbfc56ea6c3208fd78fd45307 /docs/html/wear/notifications/pages.jd | |
parent | 5d2e896457b3a803309f7babeb984a7d1a3b4f5f (diff) | |
parent | dbf711ea88b01693db1974a3a6a346cff3da6daa (diff) | |
download | frameworks_base-3257984e55434cea1a058e9829460d0db9808b0c.zip frameworks_base-3257984e55434cea1a058e9829460d0db9808b0c.tar.gz frameworks_base-3257984e55434cea1a058e9829460d0db9808b0c.tar.bz2 |
am dbf711ea: am e5c9d855: Merge "docs: updates for changes to notification APIs" into klp-modular-dev
* commit 'dbf711ea88b01693db1974a3a6a346cff3da6daa':
docs: updates for changes to notification APIs
Diffstat (limited to 'docs/html/wear/notifications/pages.jd')
-rw-r--r-- | docs/html/wear/notifications/pages.jd | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/docs/html/wear/notifications/pages.jd b/docs/html/wear/notifications/pages.jd index 558f7b8..7d18b3f 100644 --- a/docs/html/wear/notifications/pages.jd +++ b/docs/html/wear/notifications/pages.jd @@ -15,14 +15,19 @@ multiple pages, see the <a href="{@docRoot}wear/design/index.html#NotificationPages">Design Principles of Android Wear</a>.</p> - -<p>When creating a notification with multiple pages, start by creating the main notification -(the first page) the way you'd like the notification to appear on a phone -or tablet. Then, add pages one at a time with the -<a href="{@docRoot}reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html#addPage(android.app.Notification)"> +<p>To create a notification with multiple pages:</p> +<ol> + <li>Create the main notification (the first page) the way you'd like the notification to appear on a phone + or tablet.</li> + <li>Add pages one at a time with the +<a href="{@docRoot}reference/android/support/wearable/notifications/WearableNotificationOptions.Builder.html#addPage(android.app.Notification)"> <code>addPage()</code></a> method, or add multiple pages in a {@link java.util.Collection} with the -<a href="{@docRoot}reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html#addPages(java.util.Collection<android.app.Notification>)"> -<code>addPages()</code></a> method.</p> +<a href="{@docRoot}reference/android/support/wearable/notifications/WearableNotificationOptions.Builder.html#addPages(java.util.Collection<android.app.Notification>)"> +<code>addPages()</code></a> method.</li> + <li>Apply the pages to the main notification with the + <a href="{@docRoot}reference/android/support/wearable/notifications/WearableNotificationOptions.html#applyTo(android.support.v4.app.NotificationCompat.Builder)" + ><code>applyTo()</code></a> method.</li> +</ol> <p>For example, here's some code that adds a second page to a notification:</p> @@ -47,15 +52,14 @@ Notification secondPageNotification = .setStyle(secondPageStyle) .build(); -// Create main notification and add the second page +// Add second page with wearable options and apply to main notification Notification twoPageNotification = - new WearableNotifications.Builder(notificationBuilder) + new WearableNotificationsOptions.Builder() .addPage(secondPageNotification) + .build() + .applyTo(notificationBuilder) .build(); </pre> - - - </body> </html> |