diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index e79b214a91fbe..2c92d09388db7 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -95,16 +95,16 @@ public class Notification implements Parcelable /** * A timestamp related to this notification, in milliseconds since the epoch. - * + * * Default value: {@link System#currentTimeMillis() Now}. * * Choose a timestamp that will be most relevant to the user. For most finite events, this * corresponds to the time the event happened (or will happen, in the case of events that have * yet to occur but about which the user is being informed). Indefinite events should be - * timestamped according to when the activity began. - * + * timestamped according to when the activity began. + * * Some examples: - * + * *
Example: - * + * *
* Notification noti = new Notification.Builder(mContext)
* .setContentTitle("New mail from " + sender.toString())
@@ -1021,8 +1021,8 @@ public class Notification implements Parcelable
/**
* Show the {@link Notification#when} field as a stopwatch.
- *
- * Instead of presenting when as a timestamp, the notification will show an
+ *
+ * Instead of presenting when as a timestamp, the notification will show an
* automatically updating display of the minutes and seconds since when.
*
* Useful when showing an elapsed time (like an ongoing phone call).
@@ -1088,7 +1088,7 @@ public class Notification implements Parcelable
}
/**
- * Set the third line of text in the platform notification template.
+ * Set the third line of text in the platform notification template.
* Don't use if you're also using {@link #setProgress(int, int, boolean)}; they occupy the same location in the standard template.
*/
public Builder setSubText(CharSequence text) {
@@ -1350,12 +1350,12 @@ public class Notification implements Parcelable
mPriority = pri;
return this;
}
-
+
/**
* @hide
- *
+ *
* Add a kind (category) to this notification. Optional.
- *
+ *
* @see Notification#kind
*/
public Builder addKind(String k) {
@@ -1381,6 +1381,8 @@ public class Notification implements Parcelable
/**
* Add an action to this notification. Actions are typically displayed by
* the system as a button adjacent to the notification content.
+ *
+ * A notification displays up to 3 actions, from left to right in the order they were added.
*
* @param icon Resource ID of a drawable that represents the action.
* @param title Text describing the action.
@@ -1563,7 +1565,7 @@ public class Notification implements Parcelable
private RemoteViews generateActionButton(Action action) {
final boolean tombstone = (action.actionIntent == null);
- RemoteViews button = new RemoteViews(mContext.getPackageName(),
+ RemoteViews button = new RemoteViews(mContext.getPackageName(),
tombstone ? R.layout.notification_action_tombstone
: R.layout.notification_action);
button.setTextViewCompoundDrawables(R.id.action0, action.icon, 0, 0, 0);
@@ -1722,7 +1724,7 @@ public class Notification implements Parcelable
/**
* Helper class for generating large-format notifications that include a large image attachment.
- *
+ *
* This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
*
* Notification noti = new Notification.BigPictureStyle(
@@ -1734,7 +1736,7 @@ public class Notification implements Parcelable
* .bigPicture(aBigBitmap)
* .build();
*
- *
+ *
* @see Notification#bigContentView
*/
public static class BigPictureStyle extends Style {
@@ -1805,7 +1807,7 @@ public class Notification implements Parcelable
/**
* Helper class for generating large-format notifications that include a lot of text.
- *
+ *
* This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
*
* Notification noti = new Notification.BigTextStyle(
@@ -1817,7 +1819,7 @@ public class Notification implements Parcelable
* .bigText(aVeryLongString)
* .build();
*
- *
+ *
* @see Notification#bigContentView
*/
public static class BigTextStyle extends Style {
@@ -1862,7 +1864,7 @@ public class Notification implements Parcelable
mBuilder.mContentText = null;
RemoteViews contentView = getStandardView(R.layout.notification_template_big_text);
-
+
if (hadThreeLines) {
// vertical centering
contentView.setViewPadding(R.id.line1, 0, 0, 0, 0);
@@ -1886,7 +1888,7 @@ public class Notification implements Parcelable
/**
* Helper class for generating large-format notifications that include a list of (up to 5) strings.
- *
+ *
* This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
*
* Notification noti = new Notification.InboxStyle(
@@ -1901,7 +1903,7 @@ public class Notification implements Parcelable
* .setSummaryText("+3 more")
* .build();
*
- *
+ *
* @see Notification#bigContentView
*/
public static class InboxStyle extends Style {