You should do it the official Android way and define a so-called state list 
drawable 
resource<http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList>.
 
No need for playing around with touch listeners and invalidate.

On Wednesday, January 9, 2013 10:40:52 AM UTC-6, bob wrote:
>
> I made a custom View… basically my own button type that resides in a 
> ListView.
>
> I want it to change it's appearance on touch.  So, in the touch listener, 
> I call invalidate().
>
> Is this right?
>
> It seems to repaint maybe half the time.
>
> To get it to work fully, I had to also call invalidate() on the ListView 
> that it resides in… which feels wrong.
>
> Any ideas?
>
>
>
>
>

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

Reply via email to