Reputation: 642
How do I reference the HoloEverywhere themes from my project? Here's my styles_course.xml file that needs a parent theme, preferably holo light with dark action bar. Notice that the parent attribute is blank.
<?xml version="1.0" encoding="utf-8"?>
<!-- File created by the Android Action Bar Style Generator
Copyright (C) 2012 readyState Software Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<style name="Theme.course" parent="">
<item name="android:windowBackground">@color/background</item>
<item name="android:colorBackground">@color/background</item>
<item name="actionBarItemBackground">@drawable/selectable_background_course</item>
<item name="popupMenuStyle">@style/course_PopupMenu</item>
<item name="dropDownListViewStyle">@style/course_DropDownListView</item>
<item name="actionBarTabStyle">@style/course_ActionBarTabStyle</item>
<item name="actionDropDownStyle">@style/course_DropDownNav</item>
<item name="actionBarStyle">@style/course_solid_ActionBar</item>
<item name="android:actionBarItemBackground">@drawable/selectable_background_course</item>
<item name="android:popupMenuStyle">@style/course_PopupMenu</item>
<item name="android:dropDownListViewStyle">@style/course_DropDownListView</item>
<item name="android:actionBarTabStyle">@style/course_ActionBarTabStyle</item>
<item name="android:actionDropDownStyle">@style/course_DropDownNav</item>
<item name="android:actionBarStyle">@style/course_solid_ActionBar</item>
<item name="android:panelBackground">@drawable/menu_hardkey_panel_course</item>
<!-- Light.DarkActionBar specific -->
<item name="actionBarWidgetTheme">@style/Theme.course.widget</item>
<item name="android:actionBarWidgetTheme">@style/Theme.course.widget</item>
</style>
<style name="course_solid_ActionBar" parent="@style/Widget.Sherlock.Light.ActionBar.Solid.Inverse">
<item name="background">@drawable/ab_solid_course</item>
<item name="backgroundStacked">@drawable/ab_stacked_solid_course</item>
<item name="backgroundSplit">@drawable/ab_bottom_solid_course</item>
<item name="progressBarStyle">@style/course_ProgressBar</item>
<item name="android:background">@drawable/ab_solid_course</item>
<item name="android:backgroundStacked">@drawable/ab_stacked_solid_course</item>
<item name="android:backgroundSplit">@drawable/ab_bottom_solid_course</item>
<item name="android:progressBarStyle">@style/course_ProgressBar</item>
</style>
<style name="course_transparent_ActionBar" parent="@style/Widget.Sherlock.ActionBar">
<item name="background">@drawable/ab_transparent_course</item>
<item name="progressBarStyle">@style/course_ProgressBar</item>
<item name="android:background">@drawable/ab_transparent_course</item>
<item name="android:progressBarStyle">@style/course_ProgressBar</item>
</style>
<style name="course_PopupMenu" parent="@style/Widget.Sherlock.ListPopupWindow">
<item name="android:popupBackground">@drawable/menu_dropdown_panel_course</item>
</style>
<style name="course_DropDownListView" parent="@style/Widget.Sherlock.ListView.DropDown">
<item name="android:listSelector">@drawable/selectable_background_course</item>
</style>
<style name="course_ActionBarTabStyle" parent="@style/Widget.Sherlock.ActionBar.TabView">
<item name="background">@drawable/tab_indicator_ab_course</item>
<item name="android:background">@drawable/tab_indicator_ab_course</item>
</style>
<style name="course_DropDownNav" parent="@style/Widget.Sherlock.Spinner.DropDown.ActionBar">
<item name="background">@drawable/spinner_background_ab_course</item>
<item name="android:background">@drawable/spinner_background_ab_course</item>
<item name="android:popupBackground">@drawable/menu_dropdown_panel_course</item>
<item name="android:dropDownSelector">@drawable/selectable_background_course</item>
</style>
<style name="course_ProgressBar" parent="@style/Widget.Sherlock.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/progress_horizontal_course</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.course.widget" parent="@style/Theme.Sherlock">
<item name="popupMenuStyle">@style/course_PopupMenu</item>
<item name="dropDownListViewStyle">@style/course_DropDownListView</item>
<item name="android:popupMenuStyle">@style/course_PopupMenu</item>
<item name="android:dropDownListViewStyle">@style/course_DropDownListView</item>
</style>
Thanks!
Upvotes: 0
Views: 2643
Reputation: 1424
Create your own theme for application or activity just like this:
<style name="AppTheme" parent="Holo.Theme">
<!-- Or use <style name="AppTheme" parent="@style/Holo.Theme"></style> -->
</style>
Activity
should extends org.holoeverywhere.app.Activity
There are also such themes like Holo.Theme.Light
and Holo.Theme.Light.DarkActionBar
And here is the list of all styles.
Upvotes: 1
Reputation: 411
Have you tried this?
"@style/Holo.Theme.Sherlock.Light.DarkActionBar"
Edit:
For holoeverywhere 1.4 its
@style/Holo.Theme.Light.DarkActionBar
Upvotes: 0
Reputation: 2189
<resources>
<style name="MyTheme" parent="@android:styl e/Theme.Holo">
<!-- Any customizations for your app ru nning on devices with Theme.Holo here -->
</style>
</resources>
Also here's a good resource to learn more: http://android-developers.blogspot.com/2012/01/holo-everywhere.html
Upvotes: 0