Refactoring MyCanvas
To refactor the
MyCanvas class
1. To support previous event handling, remove extends CanvasNativeUI from the class declaration and add implements nUIEventListener.
2. In the sizeChanged() method, remove the first line, super.sizeChanged().