Onfinishinflate () is triggered when all the child controls in the view are mapped to XML
Onmeasure (INT, INT) determines the size of all child elements
Onlayout (Boolean, Int, INT) is triggered when the view allocates the size and position of all child elements.
Onsizechanged (INT, Int, Int, INT) is triggered when the View Size changes
Ondraw (canvas) view rendering content details
Onkeydown (INT, keyevent) is triggered when a key is pressed.
Onkeyup (INT, keyevent) triggered when a key is pressed and then popped up
Ontrackballevent (motionevent) trackball event
Ontouchevent (motionevent) touch screen event
Onfocuschanged (Boolean, Int, rect) is triggered when the view gets or loses focus.
Onwindowfocuschanged (Boolean) is triggered when the view contained in the window gets or loses focus.
Onattachedtowindow () is triggered when a view is attached to a window.
Ondetachedfromwindow () is triggered when the view leaves the attached window. android123 indicates that this method is the opposite of onattachedtowindow.
Onwindowvisibilitychanged (INT) is triggered when the visible view contained in the window changes
The above are some basic interface callback methods implemented by the view. Generally, when we need to process the display of the canvas, rewrite ondraw (canvas) with the most use: