From 916ad91c3860344250c00b6b3597db6464229c02 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Wed, 13 Jun 2012 12:17:07 -0400 Subject: [PATCH] Remove line3 in big notification unless there's text to show. If you have no subText or summaryText in a big template, but you *do* have a number, the overflow bar (below the big text or inbox or whatever) would have shown; now it does not. Bug: 6657006 Change-Id: Ib2af2712da3a98227bd8d697560893adbdc427e9 --- core/java/android/app/Notification.java | 4 ++++ core/res/res/layout/notification_template_big_text.xml | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index ec35a3f5214a..bb497c02719e 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -1670,6 +1670,9 @@ public class Notification implements Parcelable contentView.setTextViewText(R.id.text, overflowText); contentView.setViewVisibility(R.id.overflow_divider, View.VISIBLE); contentView.setViewVisibility(R.id.line3, View.VISIBLE); + } else { + contentView.setViewVisibility(R.id.overflow_divider, View.GONE); + contentView.setViewVisibility(R.id.line3, View.GONE); } return contentView; @@ -1812,6 +1815,7 @@ public class Notification implements Parcelable // Remove the content text so line3 only shows if you have a summary final boolean hadThreeLines = (mBuilder.mContentText != null && mBuilder.mSubText != null); mBuilder.mContentText = null; + RemoteViews contentView = getStandardView(R.layout.notification_template_big_text); if (hadThreeLines) { diff --git a/core/res/res/layout/notification_template_big_text.xml b/core/res/res/layout/notification_template_big_text.xml index d37788203294..0b3386b6ec8f 100644 --- a/core/res/res/layout/notification_template_big_text.xml +++ b/core/res/res/layout/notification_template_big_text.xml @@ -108,9 +108,8 @@ android:textAppearance="@style/TextAppearance.StatusBar.EventContent" android:layout_width="match_parent" android:layout_height="0dp" - android:layout_marginBottom="8dp" + android:layout_marginBottom="10dp" android:layout_marginRight="8dp" - android:layout_marginTop="2dp" android:singleLine="false" android:visibility="gone" android:maxLines="8" -- 2.11.0