From 192d3bdaaf94fd919db0f2d1f7cb0083b9bc2a04 Mon Sep 17 00:00:00 2001 From: Siyamed Sinir Date: Wed, 2 Mar 2016 14:11:34 -0800 Subject: [PATCH] Update EditText.setEllipsize JavaDoc Update EditText.setEllipsize JavaDoc to describe that MARQUEE is not supported by EditText. Bug: 26219977 Change-Id: Ibe709f3470a749c0fbb672c8ec33f0835c5d90ec --- core/java/android/widget/EditText.java | 10 ++++++++++ core/java/android/widget/TextView.java | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/java/android/widget/EditText.java b/core/java/android/widget/EditText.java index 1d242d38ab584..434e3eb8237e9 100644 --- a/core/java/android/widget/EditText.java +++ b/core/java/android/widget/EditText.java @@ -117,6 +117,16 @@ public class EditText extends TextView { Selection.extendSelection(getText(), index); } + /** + * Causes words in the text that are longer than the view's width to be ellipsized instead of + * broken in the middle. {@link TextUtils.TruncateAt#MARQUEE + * TextUtils.TruncateAt#MARQUEE} is not supported. + * + * @param ellipsis Type of ellipsis to be applied. + * @throws IllegalArgumentException When the value of ellipsis parameter is + * {@link TextUtils.TruncateAt#MARQUEE}. + * @see TextView#setEllipsize(TextUtils.TruncateAt) + */ @Override public void setEllipsize(TextUtils.TruncateAt ellipsis) { if (ellipsis == TextUtils.TruncateAt.MARQUEE) { diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index f19bf02a238f7..c14548a27c006 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7888,7 +7888,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } /** - * Causes words in the text that are longer than the view is wide + * Causes words in the text that are longer than the view's width * to be ellipsized instead of broken in the middle. You may also * want to {@link #setSingleLine} or {@link #setHorizontallyScrolling} * to constrain the text to a single line. Use null