
在AutoCompleteTextView设置白色主题的时候 下拉的选项是白色的没有内容
解决办法
1. use an extended theme in your manifest: ... <application android:theme="@style/Theme.Light.NoTitleBar.Workaround" ... > ... 2. create the new theme (res/values/themes.xml) which uses fixed styles: ... <style name="Theme.Light.NoTitleBar.Workaround" parent="@android:style/Theme.Light.NoTitleBar"> <item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextViewLight</item> <item name="android:dropDownItemStyle">@style/Widget.DropDownItemLight</item> </style> ... 3. create the styles (res/values/styles.xml) which fix the color: ... <style name="AutoCompleteTextViewLight" parent="@android:style/Widget.AutoCompleteTextView"> <item name="android:textColor">@android:color/primary_text_light</item> </style> <style name="Widget.DropDownItemLight" parent="@android:style/Widget.DropDownItem"> <item name="android:textColor">@android:color/primary_text_light</item> </style>
本文介绍了解决AutoCompleteTextView在使用白色主题时出现下拉选项内容显示为白色的问题。通过修改AndroidManifest文件和创建自定义样式来调整下拉菜单文字颜色。
768

被折叠的 条评论
为什么被折叠?



