diff options
author | Karl Rosaen <krosaen@google.com> | 2009-05-01 14:07:02 -0700 |
---|---|---|
committer | Karl Rosaen <krosaen@google.com> | 2009-05-01 14:15:11 -0700 |
commit | 743ae65992641263ae006605462af0290aac84ad (patch) | |
tree | 068fd597026cf5af7bece64d92f2a4d8d764e542 /core/java/android/widget/AutoCompleteTextView.java | |
parent | a4d8e5ce72a299d09b40fe835ee0ec889123a256 (diff) | |
download | frameworks_base-743ae65992641263ae006605462af0290aac84ad.zip frameworks_base-743ae65992641263ae006605462af0290aac84ad.tar.gz frameworks_base-743ae65992641263ae006605462af0290aac84ad.tar.bz2 |
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.
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
-rw-r--r-- | core/java/android/widget/AutoCompleteTextView.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index 1e122a7..9c10f0a 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; |