diff options
author | Luan Nguyen <luann@google.com> | 2014-11-06 23:26:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-06 23:26:53 +0000 |
commit | 712c7ea3d87be2afb7ecaf0d87ea9f9eb1a0007c (patch) | |
tree | 5506685b837f6a9dbf38421d9205a5de5956d781 /docs/html/training/wearables/notifications | |
parent | 1d295821355c6a1ffcb01866e38664343570129e (diff) | |
parent | bcb15cc1b16f64c6ab3f22b19b6fd7daff48304a (diff) | |
download | frameworks_base-712c7ea3d87be2afb7ecaf0d87ea9f9eb1a0007c.zip frameworks_base-712c7ea3d87be2afb7ecaf0d87ea9f9eb1a0007c.tar.gz frameworks_base-712c7ea3d87be2afb7ecaf0d87ea9f9eb1a0007c.tar.bz2 |
Merge "cherrypick from klp-modular-docs docs: make fixes to Wear training material Change-Id: I27c2c754a027f7202a6388a60008ad3a594132c4" into lmp-docs
Diffstat (limited to 'docs/html/training/wearables/notifications')
4 files changed, 6 insertions, 21 deletions
diff --git a/docs/html/training/wearables/notifications/creating.jd b/docs/html/training/wearables/notifications/creating.jd index 84e3311..57ac36e 100644 --- a/docs/html/training/wearables/notifications/creating.jd +++ b/docs/html/training/wearables/notifications/creating.jd @@ -4,7 +4,6 @@ page.title=Creating a Notification <div id="tb-wrapper"> <div id="tb"> - <h2>This lesson teaches you to</h2> <ol> <li><a href="#Import">Import the Necessary Classes</a></li> @@ -30,7 +29,6 @@ Notifications using {@link android.widget.RemoteViews} are stripped of custom layouts and the wearable only displays the text and icons. However, you can create <a href="{@docRoot}training/wearables/apps/layouts.html#CustomNotifications">create custom notifications</a> that use custom card layouts by creating a wearable app that runs on the wearable device.</p> -</div> <h2 id="Import">Import the necessary classes</h2> @@ -255,7 +253,7 @@ NotificationCompat.WearableExtender wearableExtender = Notification notif = new NotificationCompat.Builder(mContext) .setContentTitle("New mail from " + sender) .setContentText(subject) - .setSmallIcon(R.drawable.new_mail); + .setSmallIcon(R.drawable.new_mail) .extend(wearableExtender) .build(); </pre> @@ -278,7 +276,7 @@ method, in the <code>res/drawable-hdpi</code> directory of your handheld app.</p <p>If you ever need to read wearable-specific options at a later time, use the corresponding get method for the option. This example calls the {@link android.support.v4.app.NotificationCompat.WearableExtender#getHintHideIcon()} method to -get whether or not this notification hides the icon: +get whether or not this notification hides the icon:</p> <pre> NotificationCompat.WearableExtender wearableExtender = new NotificationCompat.WearableExtender(notif); @@ -304,14 +302,3 @@ notificationManager.notify(notificationId, notif); features from {@link android.support.v4.app.NotificationCompat.WearableExtender} do not work, so make sure to use {@link android.support.v4.app.NotificationCompat}. </p> - -<pre> -NotificationCompat.WearableExtender wearableExtender = - new NotificationCompat.WearableExtender(notif); -boolean hintHideIcon = wearableExtender.getHintHideIcon(); - </pre> - -<p>The {@link android.support.v4.app.NotificationCompat.WearableExtender} APIs allow you to add -additional pages to notifications, stack notifications, and more. Continue to the following lessons -to learn about these features. -</p> diff --git a/docs/html/training/wearables/notifications/index.jd b/docs/html/training/wearables/notifications/index.jd index a7b6733..2833dfa 100644 --- a/docs/html/training/wearables/notifications/index.jd +++ b/docs/html/training/wearables/notifications/index.jd @@ -49,5 +49,3 @@ swipes to the left.</dd> <dd>Learn how to place all similar notifications from your app in a stack, allowing users to view each notification individually without adding multiple cards to the card stream.</dd> </dl> - -</div>
\ No newline at end of file diff --git a/docs/html/training/wearables/notifications/stacks.jd b/docs/html/training/wearables/notifications/stacks.jd index 9a528a4..9e70e1b 100644 --- a/docs/html/training/wearables/notifications/stacks.jd +++ b/docs/html/training/wearables/notifications/stacks.jd @@ -87,7 +87,7 @@ notification and call {@link android.support.v4.app.NotificationCompat.Builder#s on the summary notification.</p> <p>This notification does not appear in your stack of notifications on the wearable, but -appears as the only notification on the handheld device.</p> +it appears as the only notification on the handheld device.</p> <pre style="clear:right"> Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), diff --git a/docs/html/training/wearables/notifications/voice-input.jd b/docs/html/training/wearables/notifications/voice-input.jd index 3ce1c80..5a49343 100644 --- a/docs/html/training/wearables/notifications/voice-input.jd +++ b/docs/html/training/wearables/notifications/voice-input.jd @@ -86,7 +86,7 @@ style="float:right;margin:0 0 20px 40px" /> {@link android.support.v4.app.RemoteInput}:</p> <pre> -public static final EXTRA_VOICE_REPLY = "extra_voice_reply"; +public static final String EXTRA_VOICE_REPLY = "extra_voice_reply"; ... String replyLabel = getResources().getString(R.string.reply_label); String[] replyChoices = getResources().getStringArray(R.array.reply_choices); @@ -116,7 +116,7 @@ PendingIntent replyPendingIntent = // Create the reply action and add the remote input NotificationCompat.Action action = new NotificationCompat.Action.Builder(R.drawable.ic_reply_icon, - getString(R.string.label, replyPendingIntent)) + getString(R.string.label), replyPendingIntent) .addRemoteInput(remoteInput) .build(); @@ -171,4 +171,4 @@ private CharSequence getMessageText(Intent intent) { } return null; } -</pre>
\ No newline at end of file +</pre> |