StateListDrawable is the Android way to do it, but if you really want
to set it programmatically, you'll need to call invalidate() on the
view to force it to refresh.

Jonathan


On Dec 28, 4:19 pm, jotobjects <[email protected]> wrote:
> Use a ColorStateList as your background.  This is what the default
> implementation does as I recall.  You could hunt around and find the
> state list for ListView and use that for a starting point.
>
> http://developer.android.com/guide/topics/resources/color-list-resour...
>
> or more generally a StateListDrawable
>
> http://developer.android.com/guide/topics/resources/drawable-resource...
>
> On Dec 28, 3:48 pm, dashman <[email protected]> wrote:
>
>
>
>
>
>
>
> > I've got an ExpandableListActivity.
>
> > If I change the background color of a row
> > programatically - when the user selects
> > the row - it's not hi-lighted - i.e. no visual
> > feedback.
>
> > if i don't set the background color - the default
> > yellow hi-light appears.
>
> > how can i fix this.

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