0
我这种提取物直接复制从Android在线文档Styling the Action Bar样式化操作栏兼容性
对于Android的3.0和更高版本仅
在支持Android 3.0的,只有更高,您可以定义操作栏的背景是这样:
res/values/themes.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- the theme applied to the application or activity -->
<style name="CustomActionBarTheme"
parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/MyActionBar</item>
</style>
<!-- ActionBar styles -->
<style name="MyActionBar"
parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@drawable/actionbar_background</item>
</style>
</resources>
我的minSdk是11,但我在父标签处收到兼容性警告。为什么?
你是说在文档中有错误吗? – user2798694
是的,DarkActionBar是SDK 14+ – Spotlight
你能告诉我一个如何解决它的例子吗? – user2798694