diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index e11303d2db90b..8da7c6b983db5 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -1130,9 +1130,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; diff --git a/core/res/res/layout/search_bar.xml b/core/res/res/layout/search_bar.xml index 5db0737e3c6b0..b5124904e4279 100644 --- a/core/res/res/layout/search_bar.xml +++ b/core/res/res/layout/search_bar.xml @@ -21,7 +21,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/search_bar" android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_height="wrap_content" android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants">