问题描述
我要建应该工作在Android 2.3的应用程序,我加俩ActionBarSherlock和HoloEverywhere库。
I'm building an application that should work on android 2.3 and I added both ActionBarSherlock and HoloEverywhere libraries.
为了使用ActionBarSherlock我必须使用Theme.Sherlock像这样:
In order to use ActionBarSherlock I have to use Theme.Sherlock like so :
<application
...
android:theme="@style/Theme.Sherlock"
... >
和这没关系。
我的主要活动是pretty的简单:只是一个5行的ListView(我不使用ListAcivity)
My main activity is pretty simple : just a ListView with 5 rows (I don't use 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,我仍然有橙色和放大器;黑色主题(除了当然的动作条)。现在我想修改我的表现像这样添加HoloEverywhere主题:
Since it's android 2.3, I still have the orange&black theme (except for the ActionBar of course). Now I want to add the HoloEverywhere theme by modifying my manifest like so :
<application
...
android:theme="@style/Theme.HoloEverywhereDark.Sherlock"
... >
但是,这并不能改变什么......我缺少什么?
BUT that does not change anything... What am I missing ?
推荐答案
要启用河洛主题默认情况下,每一个的ListView我去了HoloEverywhere库的styles.xml文件,然后我修改了ListViewStyle元素加入这个行:
To enable the Holo theme by default for every ListView I went in the styles.xml file of the HoloEverywhere library then I modified the "ListViewStyle" element by adding this line :
<item name="android:listSelector">@drawable/list_selector_holo_dark</item>
这篇关于如何使用ActionBarSherlock当我申请了HoloEverywhere Android的主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!