I have a custom ListView background color which is opaque, and
therefore hides the default selection color.  Of the two ways to fix
this (set a transparent listSelector color, or add a background
selector drawable that turns the row color transparent upon
selection), I chose the latter.

Here is my BG color selector:

<selector xmlns:android="http://schemas.android.com/apk/res/android";>
    <item android:state_focused="true" android:state_pressed="true"
android:drawable="@color/transparent"/>
    <item android:state_selected="true" android:drawable="@color/
transparent"/>
    <item android:drawable="@drawable/list_item_gradient_shape_color"/
>
</selector>


This is working for the most part, but on certain touches (with the
finger), the row turns transparent but no selector shows up at all.
The user can then see the background image on the underlying window,
instead of seeing the selector underneath.  For some touches, the
selector shows up after the row is made transparent, but for others,
it doesn't.  I am thinking I don't have the state selections correct
in certain cases, but I've tried a bunch of things and I can't get it
to work.

One final note is that each list item row View has a custom
OnClickListener attached -- that wouldn't mess up the row selection
color logic, would it?

- Eric

-- 
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

Reply via email to