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
onDraw() is called when invalidate() is called.
But you should know for ViewGroups: onDraw() will not be called like you expect. Rather, onDispatchDraw().
However, in a ViewGroup you can call setWillNotDraw(false) in the constructor to make onDraw() to be called on invalidate().
Take a look at this answer