Skip to content

Commit 916ad91

Browse files
committed
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
1 parent 602ad1c commit 916ad91

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/java/android/app/Notification.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,6 +1670,9 @@ protected RemoteViews getStandardView(int layoutId) {
16701670
contentView.setTextViewText(R.id.text, overflowText);
16711671
contentView.setViewVisibility(R.id.overflow_divider, View.VISIBLE);
16721672
contentView.setViewVisibility(R.id.line3, View.VISIBLE);
1673+
} else {
1674+
contentView.setViewVisibility(R.id.overflow_divider, View.GONE);
1675+
contentView.setViewVisibility(R.id.line3, View.GONE);
16731676
}
16741677

16751678
return contentView;
@@ -1812,6 +1815,7 @@ private RemoteViews makeBigContentView() {
18121815
// Remove the content text so line3 only shows if you have a summary
18131816
final boolean hadThreeLines = (mBuilder.mContentText != null && mBuilder.mSubText != null);
18141817
mBuilder.mContentText = null;
1818+
18151819
RemoteViews contentView = getStandardView(R.layout.notification_template_big_text);
18161820

18171821
if (hadThreeLines) {

core/res/res/layout/notification_template_big_text.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,8 @@
108108
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
109109
android:layout_width="match_parent"
110110
android:layout_height="0dp"
111-
android:layout_marginBottom="8dp"
111+
android:layout_marginBottom="10dp"
112112
android:layout_marginRight="8dp"
113-
android:layout_marginTop="2dp"
114113
android:singleLine="false"
115114
android:visibility="gone"
116115
android:maxLines="8"

0 commit comments

Comments
 (0)