更改 *** 作栏标题颜色Theme.AppCompat.Light.DarkActionBar android

更改 *** 作栏标题颜色Theme.AppCompat.Light.DarkActionBar android,第1张

概述我想在 android中将 *** 作栏标题颜色更改为白色.我在值Theme.AppCompat.Light和values-14使用主题Theme.AppCompat.Light.DarkActionBar 到目前为止我已经尝试过 在values文件夹中: <style name="AppBaseTheme" parent="Theme.AppCompat.Light"> <item name=" 我想在 android中将 *** 作栏标题颜色更改为白色.我在值theme.AppCompat.light和values-14使用主题theme.AppCompat.light.DarkActionbar
到目前为止我已经尝试过
在values文件夹中:
<style name="AppBasetheme" parent="theme.AppCompat.light">    <item name="actionbarStyle">@style/MyActionbar</item></style><style name="MyActionbar" parent="@style/Widget.AppCompat.light.Actionbar.solID.Inverse">    <item name="androID:textcolor">@androID:color/white</item></style>

和值-14文件夹

<style name="AppBasetheme" parent="theme.AppCompat.light.DarkActionbar">    <item name="actionbarStyle">@style/MyActionbar</item></style><!-- Actionbar styles --><style name="MyActionbar" parent="@style/Widget.AppCompat.light.Actionbar.solID.Inverse">    <item name="androID:textcolor">@androID:color/white</item></style>

但Actionbar标题颜色没有变化.

解决方法 您可以使用colorPrimary属性指定Actionbar的背景颜色;类似以下内容:
<style name="AppBasetheme" parent="theme.AppCompat.light">    <item name="colorPrimary">@androID:color/white</item>    </style>

以上是为AppCompat创建的特殊标记;你会注意到androID:namespace被省略了.

总结

以上是内存溢出为你收集整理的更改 *** 作栏标题颜色Theme.AppCompat.Light.DarkActionBar android全部内容,希望文章能够帮你解决更改 *** 作栏标题颜色Theme.AppCompat.Light.DarkActionBar android所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1130467.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存