From 743ae65992641263ae006605462af0290aac84ad Mon Sep 17 00:00:00 2001 From: Karl Rosaen Date: Fri, 1 May 2009 14:07:02 -0700 Subject: make AutoCompleteTextView take the alternate anchor view into account when computing the max available space on screen. before, it always computed the height based on the text view itself being the anchor. This fixes the clipping bug in the search dialog. --- core/java/android/widget/AutoCompleteTextView.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/java/android/widget/AutoCompleteTextView.java') diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index 1e122a72baa1..9c10f0ad1d6a 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -1171,9 +1171,9 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe } } - // Max height available on the screen for a popup anchored to us - final int maxHeight = mPopup.getMaxAvailableHeight(this, mDropDownVerticalOffset); - //otherHeights += dropDownView.getPaddingTop() + dropDownView.getPaddingBottom(); + // Max height available on the screen for a popup + final int maxHeight = + mPopup.getMaxAvailableHeight(getDropDownAnchorView(), mDropDownVerticalOffset); final int measuredHeight = mDropDownList.measureHeightOfChildren(MeasureSpec.UNSPECIFIED, 0, ListView.NO_POSITION, maxHeight - otherHeights, 2) + otherHeights; -- cgit v1.2.3