diff options
author | Robert Ly <robertly@google.com> | 2014-05-19 17:59:48 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-19 17:59:48 +0000 |
commit | dbf711ea88b01693db1974a3a6a346cff3da6daa (patch) | |
tree | a62d589537c6d5224d8a39b9421ecf13ac4838c5 /docs/html/wear/notifications/pages.jd | |
parent | 9672ee125d6aee73bf1e5425c4089285714f25bf (diff) | |
parent | e5c9d8551b22c1708723b89e8e8d6f830168f292 (diff) | |
download | frameworks_base-dbf711ea88b01693db1974a3a6a346cff3da6daa.zip frameworks_base-dbf711ea88b01693db1974a3a6a346cff3da6daa.tar.gz frameworks_base-dbf711ea88b01693db1974a3a6a346cff3da6daa.tar.bz2 |
am e5c9d855: Merge "docs: updates for changes to notification APIs" into klp-modular-dev
* commit 'e5c9d8551b22c1708723b89e8e8d6f830168f292':
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> |