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.
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