From fa0d253b77cf6e6d15c8195f206ae54e91296823 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Thu, 17 Sep 2009 17:01:59 -0700 Subject: [PATCH] Make the EditText error popup correctly resize when the view resizes. It was calling PopupWindow.update() with -1 arguments for the width and height under the impression that that would cause it to use the new values that had already been set with setWidth() and setHeight(). But in fact this caused it not to change at all. --- core/java/android/widget/TextView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index e98fd137954aa..2e3364b9e3216 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -3408,7 +3408,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (mPopup != null) { TextView tv = (TextView) mPopup.getContentView(); chooseSize(mPopup, mError, tv); - mPopup.update(this, getErrorX(), getErrorY(), -1, -1); + mPopup.update(this, getErrorX(), getErrorY(), + mPopup.getWidth(), mPopup.getHeight()); } restartMarqueeIfNeeded();