OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
375366c
)
Revert "Request re-layout after setText if layout width is 0"
author
Siyamed Sinir
<siyamed@google.com>
Tue, 3 May 2016 20:27:21 +0000
(20:27 +0000)
committer
Siyamed Sinir
<siyamed@google.com>
Tue, 3 May 2016 20:35:35 +0000
(20:35 +0000)
This reverts commit
375366cb2d6b8be3d81e59ea0ce27332c3eada66
.
Bug:
28523980
Change-Id: Ib4dd00eabaf7b5630b18373cc1d7bec61c0e155d
core/java/android/widget/TextView.java
patch
|
blob
|
history
diff --git
a/core/java/android/widget/TextView.java
b/core/java/android/widget/TextView.java
index
8097d7a
..
48fd58b
100644
(file)
--- a/
core/java/android/widget/TextView.java
+++ b/
core/java/android/widget/TextView.java
@@
-7310,7
+7310,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)) {