Selection list cut off in AutoCompleteTextView in Dialog

后端 未结 6 922
名媛妹妹
名媛妹妹 2021-02-06 09:55

I have a dialog window that covers 1/3 of the entire screen height and is displayed on top of my activity. The dialog holds two AutoCompleteTextView fields.

The problem

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-06 10:20

    As seen here: Scrolling drop-down-menu over the keyboard in autocompletetextview

    You can use the property android:dropDownHeight of the AutoCompleteTextView to force it to be of a certain height. This is not really solving the problem, but is the best I could find.

    Note: This problem only happens when using AutoCompleteTextView inside a Dialog. When it is used on the layout of an activity or a fragment it just works fine.

    This issue is present all the way from Gingerbread to Jelly Bean.

提交回复
热议问题