Strange behavior of listSelector

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Strange behavior of listSelector

Postby add_dir » Mon Dec 01, 2008 12:33 pm

Hello! I experience some strange things playing with listSelector. I put the following code in my "styles.xml":

<style name="vs">
</style>

<style name="my_theme">
<item name="android:listSelector">@drawable/theme_listselector
</item>

<item name="android:listViewStyle">?style/vs</item>
</style>

(pay attention, that vs style is absolutely empty)
In theme_listselector:

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/icon" />
</selector>

In this case all this works and ListViews use the icon.png as selector.

However if I remove the following string

<item name="android:listViewStyle">?style/vs</item>

from "my_theme" style then selector becomes standart - orange rectangle.
I can't understand why all this happens. Could you explain it to me?
add_dir
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Dec 01, 2008 12:18 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot] and 8 guests