summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2011-06-16 16:44:51 -0400
committerDaniel Sandler <dsandler@google.com>2011-06-17 13:28:56 -0400
commitebce0115e239919680fc5574ae4ca79e617fcce8 (patch)
treef77ed20ed09fe2219c08cb0605dcde692591e3b9 /core/java
parentf2288c960cce22ea3971d79f6aa13ed61c699176 (diff)
downloadframeworks_base-ebce0115e239919680fc5574ae4ca79e617fcce8.zip
frameworks_base-ebce0115e239919680fc5574ae4ca79e617fcce8.tar.gz
frameworks_base-ebce0115e239919680fc5574ae4ca79e617fcce8.tar.bz2
ICS updates to notification layouts.
Of note: 1. There is no "X" (veto) button anymore. (Well, there is, but it's offscreen so it should still be available to assistive devices.) Users can use "Clear all" or the new swipe-to-veto gesture to clear notifications. 2. As a consequence of #1, your layout goes all the way to the right edge of the notifications panel again. Enjoy the extra space! 3. The numeric bubble in the notification icon is now capped at "999+" like it is in the expanded notification view. (Note that this involves a couple of new public framework resources: one to indicate the number beyond which the substitution string will be used, and one specifying a localizable substitution string.) Bug: 4651514 Bug: 4686329 Bug: 4501990 Change-Id: I0e6bdb6aec4fe5bfc927eb1aba955d444a9414ec
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/Notification.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index c9351af..170d2b5 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -929,15 +929,15 @@ public class Notification implements Parcelable
if (mContentInfo != null) {
contentView.setTextViewText(R.id.info, mContentInfo);
} else if (mNumber > 0) {
- if (mNumber > 999) {
- contentView.setTextViewText(R.id.info, "999+");
+ final int tooBig = mContext.getResources().getInteger(
+ R.integer.status_bar_notification_info_maxnum);
+ if (mNumber > tooBig) {
+ contentView.setTextViewText(R.id.info, mContext.getResources().getString(
+ R.string.status_bar_notification_info_overflow));
} else {
NumberFormat f = NumberFormat.getIntegerInstance();
contentView.setTextViewText(R.id.info, f.format(mNumber));
}
- contentView.setFloat(R.id.info, "setTextSize",
- mContext.getResources().getDimensionPixelSize(
- R.dimen.status_bar_content_number_size));
} else {
contentView.setViewVisibility(R.id.info, View.GONE);
}