On 02/27/2012 07:53 PM, Bluemercury wrote:
Am i missing something the in selector file?
regards,
Yes - the selector should only use @andorid:color/transparent for
state_pressed or state_focused true. Something like:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_focused="true"
android:drawable="@android:color/transparent"/>
<item
android:state_pressed="true"
android:drawable="@android:color/transparent" />
*<!-- the default item -->*
<item
android:drawable="@+drawable/gradient_dialog_header" />
</selector>
This is it, no other items or states.
What this does is - lets the framework's list item background show
through when the item is pressed or focused, and shows your own gradient
when it's not.
-- Kostya
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en