Android:自动完成文本视图,建议列表显示在文本视图上方? [英] Android : autocompletetextview, suggestion list displays above the textview?

查看:31
本文介绍了Android:自动完成文本视图,建议列表显示在文本视图上方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你们中有人遇到过这个问题吗?

did one of you ever run into that problem ?

在一些高分辨率屏幕上它可以正确显示:

With some high resolutions screen it displays correctly :

但它无法正确显示的低分辨率并不是那么低,例如,在银河 spica (320x480px) 中.我希望当这个键盘从试图通过长按滚动的用户那里获得焦点时,将其置于建议列表的后面..

but the low resolutions it's not displaying correctly are not so low, for example, in galaxy spica (320x480px). I would like the keyboard to be brought behind the suggestions list when this one gets the focus from the user who's trying to scroll on it with one long click..

我已经尝试过:android:windowSoftInputMode="stateHidden|adjustPan" 在活动 manifest.xml 和所有其他组合中.仍然,它不起作用......我尝试更改文本大小、项目大小、填充、整个 autocompletetextview 的最大高度、下拉列表的最大高度,尝试了 MultiAutoCompleteTextView,甚至尝试将其嵌套在滚动视图中,什么都没有.这是因为键盘推动"了文本视图上方的列表项,所以没有键盘一切都会很好..

I' ve tried : android:windowSoftInputMode="stateHidden|adjustPan" in the activity manifest.xml and all other combinations. still, it's not working... I tried to change the text size, the items size, the padding, the max height of the whole autocompletetextview, the max height of dropdownlist, tried a MultiAutoCompleteTextView, even tried to nest it in a scrollview, nothing. it occurs because of the keyboard which "pushes" the list items above the textview so without the keyboard everything would be nice..

任何帮助将不胜感激...

any help would be much appreciated...

推荐答案

只需将 android:dropDownHeight="100dp" 添加到布局文件中的 AutoCompleteTextView 标签,

Just add android:dropDownHeight="100dp" to the AutoCompleteTextView tag in your layout file,

这篇关于Android:自动完成文本视图,建议列表显示在文本视图上方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆