Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I apply the HoloEverywhere android theme when using ActionBarSherlock?

I'm building an application that should work on android 2.3 and I added both ActionBarSherlock and HoloEverywhere libraries.

In order to use ActionBarSherlock I have to use Theme.Sherlock like so :

<application
    ...
    android:theme="@style/Theme.Sherlock"
    ...  >

And that's ok.

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>

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 ?

like image 896
Alexis Avatar asked Jul 27 '12 06:07

Alexis


1 Answers

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>
like image 133
Alexis Avatar answered Sep 28 '22 11:09

Alexis