Android AutoCompleteTextView DropDown Position

后端 未结 5 1507
鱼传尺愫
鱼传尺愫 2021-01-11 11:42

I am using following code for auto complete however, dropdown items comes above the AutoCompleteTextView. I want it to show up beneath the AutoCompleteTex

5条回答
  •  清歌不尽
    2021-01-11 12:19

    Looks like this must work:

    android:dropDownHeight="100dp"
    

    Founded here: https://stackoverflow.com/a/7648028/1723525

    Edit:

    I tried with a new Activity and the suggestions ara shown below. Maybe you have to change the dropDownHeight to 150dp because you have marginTop of 100dp. I guess that the dropDownHeight must be higher than the Y position (= padding + margin). Let me know if it works.

提交回复
热议问题