From e4a2a4f142ff72ac8cf3e99c31af42af4ce66fbf Mon Sep 17 00:00:00 2001 From: Chris Wren Date: Tue, 1 May 2012 18:08:49 -0400 Subject: [PATCH] rework big text to handle gmail use case Change-Id: I3175e198bd6f39025f4257454b43c459ed1e38f5 --- core/java/android/app/Notification.java | 7 +- .../res/layout/notification_template_base.xml | 7 -- .../layout/notification_template_big_text.xml | 95 ++++++++++--------- 3 files changed, 55 insertions(+), 54 deletions(-) diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index ecaaefc15015f..8f4efab5a099e 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -1651,11 +1651,11 @@ public class Notification implements Parcelable } private RemoteViews makeBigContentView() { - RemoteViews contentView = mBuilder.applyStandardTemplateWithActions(R.layout.notification_template_big_text); - + int bigTextId = R.layout.notification_template_big_text; + RemoteViews contentView = mBuilder.applyStandardTemplateWithActions(bigTextId); contentView.setTextViewText(R.id.big_text, mBigText); contentView.setViewVisibility(R.id.big_text, View.VISIBLE); - contentView.setTextViewText(R.id.text, ""); // XXX: what do do with this spot? + contentView.setViewVisibility(R.id.text2, View.GONE); return contentView; } @@ -1665,7 +1665,6 @@ public class Notification implements Parcelable if (mBuilder == null) { throw new IllegalArgumentException("Style requires a valid Builder object"); } - mBuilder.mSubText = null; Notification wip = mBuilder.buildUnstyled(); wip.bigContentView = makeBigContentView(); return wip; diff --git a/core/res/res/layout/notification_template_base.xml b/core/res/res/layout/notification_template_base.xml index 1dc6275a72cee..ae2953797b190 100644 --- a/core/res/res/layout/notification_template_base.xml +++ b/core/res/res/layout/notification_template_base.xml @@ -85,13 +85,6 @@ android:ellipsize="marquee" android:visibility="gone" /> - - + + + + + + - - - - + > + + - - -