自定义分/分离器在AutocompleteTextview的下拉列表 [英] Customize divider / separator in dropdown of an AutocompleteTextview

查看:319
本文介绍了自定义分/分离器在AutocompleteTextview的下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了这个问题问了一些其他时间在网站上,但没有人不能得到任何答案。

I've seen this question asked some other times on the site, but no one couldn't get any answer.

有没有什么办法可以自定义分隔在下拉列表中的出现在Android的使用AutocompleteTextview时显示?

Is there any way to customize the appearance of the divider in the dropdown showing when using an AutocompleteTextview in android?

这是pretty的方便一个ListView,但只使用了ArrayAdapter为autocompletetextview,有没有什么办法可以自定义分。

It's pretty easy for a ListView, but using only an ArrayAdapter for the autocompletetextview, is there any way to customize the divider.

(不是TextView的,我已经知道这样做)

(Not the textview, I already know doing that)

推荐答案

林不知道你如何能做到这一点单AutoCompleteTextView,但我知道如何设置它为整个应用程序。这也将帮助你:)

Im not sure how you can do it for single AutoCompleteTextView but I know how to set it for the whole application. This should also help you :)

<style name="MyTheme" parent="AppTheme">
        <item name="android:dropDownListViewStyle">@style/MyListViewStyle</item>
</style>

<style name="MyListViewStyle" parent="@android:style/Widget.ListView">
        <item name="android:divider">#F00</item>
        <item name="android:dividerHeight">1px</item>
</style>

这篇关于自定义分/分离器在AutocompleteTextview的下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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