From 98199ae4c979ea1cac62eb9871649d6ec1dd159f Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 2 Mar 2016 17:22:19 -0800 Subject: [PATCH] Fixed that the bigtext nofitication had slightly different padding The reason was that we're using a different textview there which uses a SimpleLayout. This is now changed to also use the same one. Bug: 27436418 Change-Id: I7e6dd503e09cf69ba8ed5bb6dd07fc79ee519cd3 --- .../com/android/internal/widget/ImageFloatingTextView.java | 2 ++ .../res/layout/notification_template_material_big_text.xml | 2 +- core/res/res/layout/notification_template_text.xml | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/java/com/android/internal/widget/ImageFloatingTextView.java b/core/java/com/android/internal/widget/ImageFloatingTextView.java index c4ed2e10cffea..78c5e34ba108a 100644 --- a/core/java/com/android/internal/widget/ImageFloatingTextView.java +++ b/core/java/com/android/internal/widget/ImageFloatingTextView.java @@ -65,6 +65,8 @@ public class ImageFloatingTextView extends TextView { .setTextDirection(getTextDirectionHeuristic()) .setLineSpacing(getLineSpacingExtra(), getLineSpacingMultiplier()) .setIncludePad(getIncludeFontPadding()) + .setEllipsize(shouldEllipsize ? effectiveEllipsize : null) + .setEllipsizedWidth(ellipsisWidth) .setBreakStrategy(Layout.BREAK_STRATEGY_HIGH_QUALITY) .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL); // we set the endmargin on the first 2 lines. this works just in our case but that's diff --git a/core/res/res/layout/notification_template_material_big_text.xml b/core/res/res/layout/notification_template_material_big_text.xml index 9a4b28c1298c7..3c59b4e83a057 100644 --- a/core/res/res/layout/notification_template_material_big_text.xml +++ b/core/res/res/layout/notification_template_material_big_text.xml @@ -39,7 +39,7 @@ -