Trong chủ đề chính của tôi, tôi này bao gồm:đơn Set tràn văn bản màu
<item name="android:popupMenuStyle">@style/ListPopupWindow</item>
trong styles.xml
:
<style name="ListPopupWindow" parent="@android:style/Widget.Holo.ListPopupWindow">
<item name="android:textColor">@color/bright_foreground_holo_dark</item>
</style>
nơi bright_foreground_holo_dark
là một màu xám nhạt (#fff3f3f3
). Tuy nhiên, văn bản xuất hiện như màu đen. Nền là một màu xám đậm, vì nó phải ở trong chủ đề holo tối.
Các định nghĩa này có trong android styles.xml source.
<style name="Widget.Holo.ListPopupWindow" parent="Widget.ListPopupWindow">
<item name="android:dropDownSelector">@android:drawable/list_selector_holo_dark</item>
<item name="android:popupBackground">@android:drawable/menu_dropdown_panel_holo_dark</item>
<item name="android:dropDownVerticalOffset">0dip</item>
<item name="android:dropDownHorizontalOffset">0dip</item>
<item name="android:dropDownWidth">wrap_content</item>
</style>
<style name="Widget.ListPopupWindow">
<item name="android:dropDownSelector">@android:drawable/list_selector_background</item>
<item name="android:popupBackground">@android:drawable/spinner_dropdown_background</item>
<item name="android:dropDownVerticalOffset">-10dip</item>
<item name="android:dropDownHorizontalOffset">0dip</item>
<item name="android:dropDownWidth">wrap_content</item>
</style>
<style name="Widget">
<item name="android:textAppearance">?textAppearance</item>
</style>
<style name="TextAppearance">
<item name="android:textColor">?textColorPrimary</item>
<item name="android:textColorHighlight">?textColorHighlight</item>
<item name="android:textColorHint">?textColorHint</item>
<item name="android:textColorLink">?textColorLink</item>
<item name="android:textSize">16sp</item>
<item name="android:textStyle">normal</item>
</style>
Có cùng vấn đề và đã thử nhiều cách tiếp cận khác nhau. Nó gần như có vẻ như không có móc cho rằng/Android bỏ qua bất kỳ ứng cử viên có sẵn. – Chris
bị kẹt ở cùng một điều. bạn đã tìm ra cách để giải quyết vấn đề này? – Zen