AutoCompleteTextView设置白色 主题Theme_Light问题
 在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>

相关文章:

  • 2021-12-24
  • 2021-10-17
  • 2021-11-08
  • 2021-08-04
猜你喜欢
  • 2021-07-04
  • 2021-09-28
  • 2021-05-26
  • 2021-08-22
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案