Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 743ae659 authored by Karl Rosaen's avatar Karl Rosaen
Browse files

make AutoCompleteTextView take the alternate anchor view into account when...

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.
parent a4d8e5ce
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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">