Thursday, 3 October 2013

what does the super call for onDraw do in the SurfaceView callback method, example: super.onDraw(canvas)

what does the super call for onDraw do in the SurfaceView callback method,
example: super.onDraw(canvas)

what exactly does the super.onDraw() do in this example?
what if i leave it out, does it change what will happen when onDraw method
is called?
class Preview extends SurfaceView implements SurfaceHolder.Callback {
// onDraw is a callback method of the SurfaceView class
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
// more code to implement some action when this method is called
} // end onDraw method
} // end Preview class

No comments:

Post a Comment