diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-28 13:11:13 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-28 13:11:13 -0700 |
commit | 6b46dc8616dff7a5049b9fbaa7bbf8b4c0840eb4 (patch) | |
tree | e511b47dc92460bd9e3c9048f7a90858d4085b34 /core/java/android/widget | |
parent | f0d83fd907e0d2a0b2fe563cea9ffa830ecfd33f (diff) | |
parent | 5420d01cef810c34d754cadfaa1e8cae13af06de (diff) | |
download | frameworks_base-6b46dc8616dff7a5049b9fbaa7bbf8b4c0840eb4.zip frameworks_base-6b46dc8616dff7a5049b9fbaa7bbf8b4c0840eb4.tar.gz frameworks_base-6b46dc8616dff7a5049b9fbaa7bbf8b4c0840eb4.tar.bz2 |
Merge change 8840 into donut
* changes:
Add padding to height of AutoCompleteTextView drop-down.
Diffstat (limited to 'core/java/android/widget')
-rw-r--r-- | core/java/android/widget/AutoCompleteTextView.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index a998072..456f8ed 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -104,6 +104,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe private View mDropDownAnchorView; // view is retrieved lazily from id once needed private int mDropDownWidth; private int mDropDownHeight; + private final Rect mTempRect = new Rect(); private Drawable mDropDownListHighlight; @@ -1323,7 +1324,15 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe getDropDownAnchorView(), mDropDownVerticalOffset, ignoreBottomDecorations); if (mDropDownAlwaysVisible) { - return maxHeight; + // getMaxAvailableHeight() subtracts the padding, so we put it back, + // to get the available height for the whole window + int padding = 0; + Drawable background = mPopup.getBackground(); + if (background != null) { + background.getPadding(mTempRect); + padding = mTempRect.top + mTempRect.bottom; + } + return maxHeight + padding; } return mDropDownList.measureHeightOfChildren(MeasureSpec.UNSPECIFIED, |