在API LEVE工作室Anroid的标题栏的背景颜色变化11+ [英] Title bar background color change in anroid studio in API Leve 11+

查看:204
本文介绍了在API LEVE工作室Anroid的标题栏的背景颜色变化11+的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图改变style.xml改变应用程序的主题类似以下内容:

I have try to change style.xml to change app theme like following:

<resources>

<!-- Base application theme. -->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
    <!-- Customize your theme here. -->

</style>

<style name="AppTheme" parent="AppBaseTheme" >
    <item name="android:actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
    <item name="android:background">@color/primary_color</item>
</style>

给我很好的解决方案。

在此先感谢

推荐答案

尝试这样的事情;我希望这是你想要什么,会帮助你:

Try something like this; I hope this is what you want and will help you:

 <style name="AppTheme" parent="Theme.AppCompat.Light">

    <item name="colorPrimary">#009000</item>
</style>

这篇关于在API LEVE工作室Anroid的标题栏的背景颜色变化11+的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆