是否可以在 AutoCompleteTextView 的弹出窗口中删除/更改分隔符的颜色?在 ListView 中,我使用了“delimiter”参数,但在 AutoCompleteTextView 中没有发现任何类似的参数。
谢谢。
是否可以在 AutoCompleteTextView 的弹出窗口中删除/更改分隔符的颜色?在 ListView 中,我使用了“delimiter”参数,但在 AutoCompleteTextView 中没有发现任何类似的参数。
谢谢。
用于删除分隔线的快速修复解决方案可能是编写自定义 XML 来覆盖每个单元格的样式(通过 SetDropDownViewResource)。之后,您可以更改 autocompletetextview 上的 android:popupBackground 属性,使其与项目背景的颜色相匹配。
为您的 AutoCompleteTextView 使用适配器。然后,您可以执行以下操作:
adapter.setDropDownViewResource(R.layout.spinner_dropdown_item);
布局可以由您配置。