Selection list cut off in AutoCompleteTextView in Dialog

后端 未结 6 916
名媛妹妹
名媛妹妹 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:22

    if (yourlist.size() > 5) {
        yourtextview.setDropDownHeight(562);
    } else {
        yourtextview.setDropDownHeight(anytextview.getHeight() * yourlist.size());
    }
    
    //Workaround ->  Write this condition under on click and on focus change of your autocomplete text view 
    

提交回复
热议问题