简体   繁体   English

Android:AutoCompleteTextView的上边距ListView

[英]Android: AutoCompleteTextView top margin ListView

The AutoCompleteTextView displays a ListView in a popup for auto completion. AutoCompleteTextView在弹出窗口中显示ListView以自动完成。 On top of the popup, before the ListView begins, there ist a little margin, in effect the first line in ListView looks higher than the other entries. 在弹出窗口的顶部,在ListView开始之前,有一点边距,实际上ListView的第一行看起来比其他条目要高。 Is there a way to remove the margin. 有没有办法删除边距。 For me it is just a problem because a changed the "dropDownVerticalOffset" of the AutoCompleteTextView to be on bottom of the TextView, otherwise there is negative offset and you don't see the difference if height of the first line. 对我来说,这只是一个问题,因为将AutoCompleteTextView的“ dropDownVerticalOffset”更改为位于TextView的底部,否则存在负偏移,并且如果第一行的高度没有差异。

How can I remove this margin? 如何删除该保证金?

Try to add XML attribute to your AutoCompleteTextView: 尝试将XML属性添加到您的AutoCompleteTextView中:

android:popupBackground="color_what_you_want_to_background"

Hope, it helps you 希望对您有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM