gpt4 book ai didi

android - 如何更改 android 中 sherlock actionbar overflow-dropdown 项目的文本颜色?

转载 作者:太空宇宙 更新时间:2023-11-03 12:56:36 25 4
gpt4 key购买 nike

以下是我如何更改 sherlock 操作栏溢出下拉菜单的背景颜色。如何更改下拉项文本颜色和重力?请帮我。目前文本颜色为黑色。 enter image description here

<style name="AppBaseTheme" parent="@style/Theme.Sherlock.Light.ForceOverflow">

</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:actionOverflowButtonStyle">@style/CustomActionOverFlowStyle</item>
<item name="actionOverflowButtonStyle">@style/CustomActionOverFlowStyle</item>
<item name="actionButtonStyle">@style/CustomActionButtonStyle</item>
<item name="android:actionButtonStyle">@style/CustomActionButtonStyle</item>
<item name="android:dropDownListViewStyle">@style/CustomDropDownListView</item>
<item name="dropDownListViewStyle">@style/CustomDropDownListView</item>

</style>

<style name="CustomDropDownListView" parent="android:style/Widget.Holo.ListView.DropDown">
<item name="android:background">@color/abs__bright_foreground_disabled_holo_dark</item> <!-- this works -->
<item name="android:textColor">@color/white</item> <!-- but this is not working -->
<item name="android:divider">@color/app_bg_color</item>
<item name="android:dividerHeight">0.5dp</item>
<item name="android:dividerPadding">1dp</item>
<item name="android:gravity">right</item>
</style>

最佳答案

最后就这样解决了。但是,我没有测试对 ActionBar 上其他小部件的影响:

<item name="android:actionBarWidgetTheme">@style/CustomActionOverflowDropDownText</item>
<item name="actionBarWidgetTheme">@style/CustomActionOverflowDropDownText</item>

<style name="CustomActionOverflowDropDownText" parent="Widget">
<item name="android:textColor">@color/app_bg_color</item>
<item name="android:gravity">right</item>
</style>

关于android - 如何更改 android 中 sherlock actionbar overflow-dropdown 项目的文本颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18980986/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com