How to show AutoCompleteTextView suggestions in landscape orientation
@vamsiampolu answer is correct but if you want to use same by using java, you can use
itemautoTxt.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
where itemautoTxt
is AutoCompleteTextView
hope this will helpful to others.
In the layout where you defined your AutoCompleteTextView use android:imeOptions=flagNoExtractUi
The flag prevents the element from going full-screen when it is rotated to landscape mode.
Firstly, set this android:imeOptions="flagNoExtractUi"
in XML.
Secondly, your dropdown may be under your keybord or above it. So it may not fit on screen - appear below or above the visible area of the screen. To fix this use android:dropDownAnchor="@id/your_view"
to pin dropdown to the required view.
Thirdly, the dropdown may not appear on some devices or may appear unstable.