【发布时间】:2012-01-25 07:21:05
【问题描述】:
我正在实现 ActionBar 以在 xml 中使用此样式脚本设置文本的颜色,但是当我运行我的应用程序时出现错误有人知道我缺少什么
这是我的 style.xml 文件
<!-- Start with the Holographic Light theme -->
<style name="Theme.IOSched" parent="android:style/Theme.Holo.Light">
<item name="android:windowBackground">@drawable/window_background</item>
<item name="android:actionBarStyle">@style/ActionBar</item>
<!-- custom attributes
<item name="textHeaderMaxLines">@integer/text_header_max_lines</item>
<item name="trackAbstractMaxLines">@integer/track_abstract_max_lines</item>-->
</style>
<style name="Theme.IOSched.Home" parent="style/Theme.IOSched">
<item name="android:windowBackground">@drawable/window_background_home</item>
<item name="android:actionBarStyle">@style/ActionBar</item>
</style>
<style name="ActionBar" parent="android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">@color/actionbar_background</item>
<item name="android:textColor">@color/accent_1</item>
<item name="android:titleTextStyle">@style/ActionBarText</item>
</style>
<style name="ActionBarText" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"> <!-- getting here error-->
<item name="android:textColor">@color/accent_1</item>
<item name="android:textStyle">bold</item>
</style>
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Widget.ActionBar.Title'.
【问题讨论】:
-
您是否在项目属性中将构建目标设置为 3.0?
-
当不包含 playServices 并且 android:value="@integer/google_play_services_version" 给出错误时,我遇到此错误
标签: android coding-style