I put a Log.d() call into the onDraw() of my extended View, so I could see how often and when it\'s getting called. It gets called upon instantiation of the view, which is
When is onDraw called (check this for more details)
The onDraw method is called whenever android thinks that your view should be redrawn. This can be tha case when your view is animated, in which case onDraw is called for every frame in the animation. It is also called when the layout changes and your view is re-positioned on the screen.
But what if some data inside your view has changed and you want to make sure that the view is redrawn. You can’t call onDraw directly. Instead you should call invalidate to tell the view that it needs to redraw itself.