【发布时间】:2014-02-23 00:55:03
【问题描述】:
我正在尝试为我的操作栏设置主题。当我应用我的主题时,预览(在 Android Studio 中)会正确呈现它,但在设备上运行时,Action Bar 完全丢失了。
我的 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>
预览:
运行时:
我错过了什么?
【问题讨论】:
标签: android android-actionbar android-styles