android–Action Bar Style导致Action Bar消失

android–Action Bar Style导致Action Bar消失,第1张

概述我正试图以我的行动栏为主题.当我应用我的主题时,预览(在AndroidStudio中)会正确呈现它,但在设备上运行时, *** 作栏完全丢失.我的values/styles.xml文件:<resources><stylename="AppBaseTheme"parent="android:Theme.Holo.Light"><itemname="android:windowBac

我正试图以我的行动栏为主题.当我应用我的主题时,预览(在Android Studio中)会正确呈现它,但在设备上运行时, *** 作栏完全丢失.

我的values / styles.xml文件:

<resources>    <style name="AppBasetheme" parent="androID:theme.Holo.light">        <item name="androID:windowBackground">@color/background_gray</item>        <item name="androID:actionbarStyle">@style/GreenActionbar</item>    </style>    <style name="Apptheme" parent="AppBasetheme"/>    <style name="GreenActionbarBase">        <item name="androID:background">#00c341</item>    </style>    <style name="GreenActionbar" parent="GreenActionbarBase"/>    </resources>

预习:

运行:

我错过了什么?

解决方法:

<resources>    <style name="AppBasetheme" parent="@style/theme.Holo.light">        <item name="androID:windowBackground">@color/background_gray</item>        <item name="androID:actionbarStyle">@style/GreenActionbar</item>    </style>    <style name="Apptheme" parent="AppBasetheme"/>    <style name="GreenActionbarBase" parent="@style/Widget.THE_STYLE_YOU_WANT">        <item name="androID:background">#00c341</item>    </style>    <style name="GreenActionbar" parent="GreenActionbarBase"/>    </resources>

检查答案.我认为你需要拥有GreenActionbarBase的父级.

总结

以上是内存溢出为你收集整理的android – Action Bar Style导致Action Bar消失全部内容,希望文章能够帮你解决android – Action Bar Style导致Action Bar消失所遇到的程序开发问题。

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

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

原文地址: http://outofmemory.cn/web/1113308.html

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

发表评论

登录后才能评论

评论列表(0条)

保存