API Leve 11+中android studio中标题栏背景颜色的更改 [英] Title bar background color change in android studio in API Leve 11+

查看:109
本文介绍了API Leve 11+中android studio中标题栏背景颜色的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试更改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>

给我一​​个很好的解决方案.

give me nice solution.

预先感谢

推荐答案

尝试类似的方法;我希望这是您想要的,并会为您提供帮助:

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 11+中android studio中标题栏背景颜色的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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