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 name="my_theme">
<item name="android:listSelector">@drawable/theme_listselector

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

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

<selector xmlns:android="">
<item android:state_focused="true" android:drawable="@drawable/icon" />

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?
Once Poster
Once Poster
Posts: 1
Joined: Mon Dec 01, 2008 12:18 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 1 guest