gpt4 book ai didi

android - 更改背景颜色时 ActionBar 消失

转载 作者:行者123 更新时间:2023-11-29 17:53:00 32 4
gpt4 key购买 nike

我已将 values-v14 中的 styles.xml 修改为:

<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<item name="android:actionBarStyle">@style/BlueWhiteActionBarTheme</item>
</style>

<style name="BlueWhiteActionBarTheme" parent="AppBaseTheme">
<item name="android:background">#0089CD</item>
</style>

但是如果我运行这个修改后的应用程序,ActionBar 就会消失,有人知道我做错了什么吗?

最佳答案

更改为

  <style name="MyTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/BlueWhiteActionBarTheme</item>
</style>

<style name="BlueWhiteActionBarTheme" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">#0089CD</item>
</style>

并应用于 Activity

 android:theme="@style/BlueWhiteActionBarTheme"

关于android - 更改背景颜色时 ActionBar 消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21644135/

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