summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAndrew Solovay <asolovay@google.com>2014-05-09 21:54:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-09 21:54:52 +0000
commit9c7fa9c090fd0a1016a087399f5edaf5d90d401b (patch)
tree35784409c72d9fd23a11e3151bc594b161c7d185 /docs
parent049803a00ed6b35072c3970c382d45b013798250 (diff)
parent99aa0c17d2f033590314272007fee435191ce551 (diff)
downloadframeworks_base-9c7fa9c090fd0a1016a087399f5edaf5d90d401b.zip
frameworks_base-9c7fa9c090fd0a1016a087399f5edaf5d90d401b.tar.gz
frameworks_base-9c7fa9c090fd0a1016a087399f5edaf5d90d401b.tar.bz2
am 99aa0c17: am 5119f6e6: am 3f22f22a: am bff632c8: Merge "doc: Documented how to set notification priority." into klp-docs
* commit '99aa0c17d2f033590314272007fee435191ce551': doc: Documented how to set notification priority.
Diffstat (limited to 'docs')
-rw-r--r--docs/html/guide/topics/ui/notifiers/notifications.jd21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/html/guide/topics/ui/notifiers/notifications.jd b/docs/html/guide/topics/ui/notifiers/notifications.jd
index 3b1292e..59c2269 100644
--- a/docs/html/guide/topics/ui/notifiers/notifications.jd
+++ b/docs/html/guide/topics/ui/notifiers/notifications.jd
@@ -16,6 +16,7 @@ page.title=Notifications
<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="#Priority">Notification priority</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>
<li><a href="#Compatibility">Handling compatibility</a></li>
@@ -290,6 +291,26 @@ page.title=Notifications
{@link android.support.v4.app.NotificationCompat.Builder}.
</p>
<!-- ------------------------------------------------------------------------------------------ -->
+<h3 id="Priority">Notification priority</h3>
+<p>
+ If you wish, you can set the priority of a notification. The priority acts
+ as a hint to the device UI about how the notification should be displayed.
+ To set a notification's priority, call {@link
+ android.support.v4.app.NotificationCompat.Builder#setPriority(int)
+ NotificationCompat.Builder.setPriority()} and pass in one of the {@link
+ android.support.v4.app.NotificationCompat} priority constants. There are
+ five priority levels, ranging from {@link
+ android.support.v4.app.NotificationCompat#PRIORITY_MIN} (-2) to {@link
+ android.support.v4.app.NotificationCompat#PRIORITY_MAX} (2); if not set, the
+ priority defaults to {@link
+ android.support.v4.app.NotificationCompat#PRIORITY_DEFAULT} (0).
+</p>
+<p> For information about setting an appropriate priority level, see "Correctly
+ set and manage notification priority" in the <a
+ href="{@docRoot}design/patterns/notifications.html">Notifications</a> Design
+ guide.
+</p>
+<!-- ------------------------------------------------------------------------------------------ -->
<h3 id="SimpleNotification">Creating a simple notification</h3>
<p>
The following snippet illustrates a simple notification that specifies an activity to open when