I ran into a little weird problem.. Maybe anyone can help me out...
I want to change the background drawables (the listSelector) of a
Listview so that I can use my own images. I wanted to do this by
somehow "overriding" the items of the Default Theme that I want to
change while keeping (or "inheriting") the ones that remain
unchanged.
So what I did is I created a styles.xml which looks like this:
-----------------------------------------------------
<resources>
<!-- Base application theme is the default theme. -->
<style name="MyOwnTheme" parent="android:Theme">
<item name="android:listSelector">@drawable/
list_selector_background</item>
</style>
</resources>
-----------------------------------------------------
The top of my AndroidManifest.xml looks like this:
-----------------------------------------------------
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mydomain.myownapp"
android:theme="@style/MyOwnTheme"
>
...
-----------------------------------------------------
I thought this would override "android:listSelector" everywhere in my
application. Instead nothing happens.
what I can do is set my own style in the ListView-Tag in the layout
xml file:
....
<ListView android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:drawSelectorOnTop="false"
android:layout_marginTop="15px"
style="@style/MyOwnTheme"
/>
If I do that I, the ListView shows with my own style which is some
PNGs in the drawable folder..
Am I missing something? How can I apply a theme to my whole
application, so that every list uses my own PNGs?
thx!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---