am e1e0dc8e: Make sure we relayout the TextView when the text changes and marquee is enabled.
Merge commit 'e1e0dc8e6eaec052ebb6b88f5b1223075ce5a356' into eclair-mr2 * commit 'e1e0dc8e6eaec052ebb6b88f5b1223075ce5a356': Make sure we relayout the TextView when the text changes and marquee is enabled.
This commit is contained in:
@@ -3964,8 +3964,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
mHighlightPath = new Path();
|
||||
|
||||
if (selStart == selEnd) {
|
||||
if ((SystemClock.uptimeMillis() - mShowCursor) % (2 * BLINK)
|
||||
< BLINK) {
|
||||
if ((SystemClock.uptimeMillis() - mShowCursor) % (2 * BLINK) < BLINK) {
|
||||
if (mHighlightPathBogus) {
|
||||
mHighlightPath.reset();
|
||||
mLayout.getCursorPath(selStart, mHighlightPath, mText);
|
||||
@@ -5344,21 +5343,24 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
* will happen at measure).
|
||||
*/
|
||||
makeNewLayout(want, hintWant, UNKNOWN_BORING, UNKNOWN_BORING,
|
||||
mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(), false);
|
||||
mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(),
|
||||
false);
|
||||
|
||||
// In a fixed-height view, so use our new text layout.
|
||||
if (mLayoutParams.height != LayoutParams.WRAP_CONTENT &&
|
||||
mLayoutParams.height != LayoutParams.FILL_PARENT) {
|
||||
invalidate();
|
||||
return;
|
||||
}
|
||||
|
||||
// Dynamic height, but height has stayed the same,
|
||||
// so use our new text layout.
|
||||
if (mLayout.getHeight() == oldht &&
|
||||
(mHintLayout == null || mHintLayout.getHeight() == oldht)) {
|
||||
invalidate();
|
||||
return;
|
||||
if (mEllipsize != TextUtils.TruncateAt.MARQUEE) {
|
||||
// In a fixed-height view, so use our new text layout.
|
||||
if (mLayoutParams.height != LayoutParams.WRAP_CONTENT &&
|
||||
mLayoutParams.height != LayoutParams.FILL_PARENT) {
|
||||
invalidate();
|
||||
return;
|
||||
}
|
||||
|
||||
// Dynamic height, but height has stayed the same,
|
||||
// so use our new text layout.
|
||||
if (mLayout.getHeight() == oldht &&
|
||||
(mHintLayout == null || mHintLayout.getHeight() == oldht)) {
|
||||
invalidate();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// We lose: the height has changed and we have a dynamic height.
|
||||
|
||||
Reference in New Issue
Block a user