Merge "Revert "Request re-layout after setText if layout width is 0"" into nyc-dev

am: c18009e6dd

* commit 'c18009e6dd32f04fdad7f1b27a0a6b52ee5c875c':
  Revert "Request re-layout after setText if layout width is 0"

Change-Id: I2c0b8b910f5cd5de82f3b6831b9dd9166a280dc1
This commit is contained in:
Siyamed Sinir
2016-05-03 21:32:28 +00:00
committed by android-build-merger

View File

@@ -7311,7 +7311,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 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 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)) && (mMaxWidthMode == mMinWidthMode && mMaxWidth == mMinWidth)) &&
(mHint == null || mHintLayout != null) && (mHint == null || mHintLayout != null) &&
(mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight() > 0)) { (mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight() > 0)) {