[英]Android Autocomplete TextView drop down width
I want the dropdown of my auto complete TextView to cover the entire screen width. 我希望自动完成TextView的下拉菜单覆盖整个屏幕宽度。 Currently the normal behaviour of the autocomplete textview is such that it covers only the width of the EditText (screenshot below). 目前,自动完成文本视图的正常行为是仅覆盖EditText的宽度(下面的屏幕截图)。
How do I do it ? 我该怎么做 ? It should look somewhat like the default maps app in android. 它应该看起来有点像android中的默认地图应用程序。
http://developer.android.com/reference/android/widget/AutoCompleteTextView.html#attr_android:dropDownWidth http://developer.android.com/reference/android/widget/AutoCompleteTextView.html#attr_android:dropDownWidth
By putting the value -1 or fill_parent it should work 通过设置值-1或fill_parent它应该工作
autoCompleteTextView.setDropDownWidth(getResources().getDisplayMetrics().widthPixels);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.