如何以横向显示AutoCompleteTextView建议 [英] How to show AutoCompleteTextView suggestions in landscape orientation
问题描述
AutoCompleteTextView以纵向模式在下拉菜单中显示建议.我想以对话框或横向模式在下拉菜单中显示建议,这里EditText和键盘全屏显示.
AutoCompleteTextView displays it's suggestions in a dropdown in the portrait mode.I would like to display suggestions either in a dialog or in a dropdown in the landscape mode,here the EditText and the keyboard go full screen.
我应该在适配器中使用哪种布局以在横向模式下将提示显示为对话框.
我目前正在使用android.R.layout.simple_dropdown_item_1line
.
Which layout should I use in the Adapter to display hints as a dialog in landscape mode.
Im currently using android.R.layout.simple_dropdown_item_1line
.
推荐答案
在定义AutoCompleteTextView的布局中,使用android:imeOptions=flagNoExtractUi
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.
这篇关于如何以横向显示AutoCompleteTextView建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!