【发布时间】:2012-07-27 06:46:50
【问题描述】:
我正在构建一个应该在 android 2.3 上运行的应用程序,并且我添加了 ActionBarSherlock 和 HoloEverywhere 库。
为了使用 ActionBarSherlock 我必须像这样使用 Theme.Sherlock :
<application
...
android:theme="@style/Theme.Sherlock"
... >
没关系。
我的主要活动非常简单:只是一个有 5 行的 ListView(我不使用 ListAcivity)。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/menuListView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
因为是android 2.3,我还是有橙黑主题的(当然除了ActionBar)。现在我想通过像这样修改我的清单来添加 HoloEverywhere 主题:
<application
...
android:theme="@style/Theme.HoloEverywhereDark.Sherlock"
... >
但这并没有改变任何东西......我错过了什么?
【问题讨论】:
-
我需要像以前版本中的 ICS 这样的微调器。但我尝试在任何地方导入 ActionBarSherlock 和 Holoevery。但是在 eclipse 中导入后会抛出很多错误。另外请告诉我们不能在没有 ActionBarSherlock 的情况下在任何地方使用 holoeevery 吗?
-
哪些错误?是的,你可以在没有 actionbarsherlock 的情况下使用 Holoeverywhere
-
喜欢资源未找到错误。我所做的步骤是从现有代码导入 is->File->New Project->Android Project。
-
检查 R.java 文件是否正确生成,有时不是。此外,您应该在 HoloEverywhere 项目的属性中将 ActionBarSherlock 项目设置为库。
标签: android android-actionbar actionbarsherlock android-theme android-holo-everywhere