Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 加载后操作栏颜色发生变化_Android_Android Actionbar_Android Styles - Fatal编程技术网

Android 加载后操作栏颜色发生变化

Android 加载后操作栏颜色发生变化,android,android-actionbar,android-styles,Android,Android Actionbar,Android Styles,当我第一次启动应用程序时,操作栏只有一种颜色,但当活动加载完成时,它会突然变亮一点,即使我没有以编程方式对其进行任何更改 这是my styles.xml: <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> <!-- Theme customizations available in newer API levels can go in res/values-vXX/

当我第一次启动应用程序时,操作栏只有一种颜色,但当活动加载完成时,它会突然变亮一点,即使我没有以编程方式对其进行任何更改

这是my styles.xml:

<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
    <!--
        Theme customizations available in newer API levels can go in
        res/values-vXX/styles.xml, while customizations related to
        backward-compatibility can go here.
    -->
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

<style name="MyActionBar" parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
    <item name="android:background">@color/sp_orange</item>
    <item name="android:titleTextStyle">@style/TitleColor</item>
    <item name="android:displayOptions"></item>
</style>

<style name="TitleColor" parent="android:TextAppearance.Holo.Widget.ActionBar.Title">
    <item name="android:textColor">@android:color/white</item>
</style>

@样式/MyActionBar
@颜色/sp_橙色
@样式/标题颜色
@android:彩色/白色
它开始时是一个很好的深橙色(指定的sp_橙色),然后稍微变淡

我试着对android:background元素进行注释,以防我无意中以编程方式设置了较浅的颜色而没有意识到——结果是操作栏一开始是黑色的,然后变成了深灰色


有人知道为什么会发生这种情况,以及如何防止这种情况吗?

你知道原始色调是否与sp_orange匹配,然后变得更亮,或者原始色调是否实际上比sp_orange暗,然后改变以匹配它吗?基于在模拟器中启动并使用OSX的“DigitalColor Meter”,看起来是这样的用于在sRGB中读取屏幕颜色的工具。