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

Commit 00a5b992 authored by Bjorn Bringert's avatar Bjorn Bringert
Browse files

Ignore unneeded soft keyboard in ACTV height calc

Before, if dropDownAlwaysVisible was false,
the soft keyboard height was always taken into
account when calculating the available vertical space for
the AutoCompleteTextView drop-down height.
This meant that the drop-down would never pop over the soft
keyboard when navigating in the drop-down list.

This change makes the drop-down pop over the soft keyboard
when the keyboard is not needed, regardless of the value of
dropDownAlwaysVisible.

Fixes http://b/issue?id=1978935
parent 8b9baf2d
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -1296,11 +1296,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
            }
        }

        // Max height available on the screen for a popup. If this AutoCompleteTextView has
        // the dropDownAlwaysVisible attribute, and the input method is not currently required,
        // we then we ask for the height ignoring any bottom decorations like the input method.
        // Otherwise we respect the input method.
        boolean ignoreBottomDecorations = mDropDownAlwaysVisible &&
        // Max height available on the screen for a popup.
        boolean ignoreBottomDecorations =
                mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED;
        final int maxHeight = mPopup.getMaxAvailableHeight(
                getDropDownAnchorView(), mDropDownVerticalOffset, ignoreBottomDecorations);