Eurig Jones wrote:
> I have a ListView component and its items are highlighted orange when
> clicked or selected with the trackball, as you would expect as this is
> the default behaviour.
> 
> Some of my list items get coloured with setBackgroundColor(). These
> coloured items seem to hide the orange highlighting when clicked or
> selected.
> 
> How can I colour some of my items like this and still inherit this
> highlighting behaviour?

One option is to use some amount of transparency in your background
color, to allow the orange highlight to show through.

Another option is to use android:drawSelectorOnTop="true" and create
your own custom list selector drawable (probably a nine-patch or a
ShapeDrawable), so that the selector appears over top of the row rather
than behind it.


-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.0 Available!

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