summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Siyamed Sinir <siyamed@google.com> 2017-02-24 07:45:49 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-02-24 07:45:54 +0000
commita2ba2a3923f4b247ad516c28a7f3449f9abfd21c (patch)
treef46bd55f07ce7433d63d66a0833c783b0e979737
parente22216df4b862f919bcf366af8739c289aa63546 (diff)
parent6f29b7aa9e0b16f85dc8800270825b323412ea8e (diff)
Merge "Revert "Request re-layout after setText if layout width is 0""
-rw-r--r--core/java/android/widget/TextView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 5e6e0f921e92..9078e613cf6b 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -8208,7 +8208,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// If we have a fixed width, we can just swap in a new text layout
// if the text height stays the same or if the view height is fixed.
- if (((mLayoutParams.width != LayoutParams.WRAP_CONTENT && mLayoutParams.width != 0)
+ if ((mLayoutParams.width != LayoutParams.WRAP_CONTENT
|| (mMaxWidthMode == mMinWidthMode && mMaxWidth == mMinWidth))
&& (mHint == null || mHintLayout != null)
&& (mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight() > 0)) {