tags:

views:

20

answers:

1

I have a custom view and a button in a linear layout. If I press the button I get an onDraw request in my view code and if a release the button I do get another onDraw(). Does anyone know how to avoid this?

Screenshot of the app can be seen on: http://home-5.worldonline.nl/~jdekeij/android.html

+1  A: 

This is behaving as designed.

CommonsWare
Agreed. There can be listeners hooked to every event which can "invalidate" a view, therefore, the request from parent to the view to redraw itself.
Samuh