diff options
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 c4ed2e10cffe..78c5e34ba108 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 9a4b28c1298c..3c59b4e83a05 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 @@ <com.android.internal.widget.ImageFloatingTextView android:id="@+id/big_text" android:layout_width="match_parent" android:layout_height="0dp" - android:layout_marginTop="1.5dp" + android:layout_marginTop="1dp" android:paddingBottom="@dimen/notification_content_margin_bottom" android:textAppearance="@style/TextAppearance.Material.Notification" android:singleLine="false" diff --git a/core/res/res/layout/notification_template_text.xml b/core/res/res/layout/notification_template_text.xml index 38470cd52c8b..47b30ec99299 100644 --- a/core/res/res/layout/notification_template_text.xml +++ b/core/res/res/layout/notification_template_text.xml @@ -14,12 +14,12 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License --> -<TextView xmlns:android="http://schemas.android.com/apk/res/android" +<com.android.internal.widget.ImageFloatingTextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top" - android:layout_marginTop="1.5dp" + android:layout_marginTop="1dp" android:ellipsize="marquee" android:fadingEdge="horizontal" android:gravity="top" |