Android constructor and Android Constructor
This constructor is called when Java code creates a View instance or loads and constructs the interface based on the XML layout file.
1. onFinishInflate (): This is a callback method. When the application loads the component from the XML layout file and uses it to build the interface, this method will be called back.
2. onMeasure (int, int): Call this method to check the size of the View component and all its child components.
3. onLayout (boolean, int, int): This method is called back when the component needs to be assigned its sub-component location.
4. onSizeChanged (int, int): calls back this method when the size of the component is changed.
5. onDraw (Canvas): calls back this method when the component is about to draw its content.
6. onKeyDown (int, KeyEvent): This method is triggered when a key is pressed.
7. onKeyUp (int, KeyEvent): This method is triggered when a key is released.
8. onTrackballEvent (MotionEvent): This method is triggered when a trajectory event occurs.
9. onTouchEvent (MotionEvent): This method is triggered when a touch screen event occurs.
10. onWindowFocusChanged (boolean): This method is triggered when the component gets and loses focus.
11. onAttachedToWindow (): This method is triggered when the component is put into a window.
12. onDetachedFromWindow (): This method is triggered when the component is detached from a window.
13. onWindowVisibilityChanged (int): This method is triggered when the visibility of the window containing this component changes.