Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/196.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 Layout_Android Theme - Fatal编程技术网

Android 使用暗色操作栏编辑全息灯光

Android 使用暗色操作栏编辑全息灯光,android,android-layout,android-theme,Android,Android Layout,Android Theme,我喜欢全息灯的主题,但想改变一下周围的颜色。因此,我想将动作栏上的背景从黑色更改为橙色。我该怎么做呢?您可以创建自定义样式,并将其添加到主题中 <?xml version="1.0" encoding="utf-8"?> <resources> <!-- the theme applied to the application or activity --> <style name="MyActivityTheme" parent="@android:s

我喜欢全息灯的主题,但想改变一下周围的颜色。因此,我想将动作栏上的背景从黑色更改为橙色。我该怎么做呢?

您可以创建自定义样式,并将其添加到主题中

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- the theme applied to the application or activity -->
<style name="MyActivityTheme" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
    <!-- other activity and action bar styles here -->
</style>

<!-- style for the action bar backgrounds -->
<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <!-- Use a color attribute defined in colors.xml -->
    <item name="android:background">@color/orange</item>
    <!-- Or use a regular color code (This is orange)-->
    <item name="android:background">#F3D3D</item>
</style>

@样式/MyActionBar
@颜色/橙色
#F3D3D

可能存在的副本