Activity: One of the four main Android components for displaying an interface to interact with the user
---- Display Interface
---- interacting with users
Activity is equivalent to the controller, which is responsible for invoking the business class method. simple business can be handled directly in the activity .
Activity is built into the setcontentview ( Resource location ) of the Window object . Resource Type . Resources ) method to show the interface.
User through the View operator interface.
When interacting with the user, the event is captured through the View , and the message is passed through windowmanagerservice ( the control of the current operation, the type of the event ). the Android Framework then backs up the corresponding Activity method to enable interaction with the user.
window: Yes android view decorview (decorative view), which is the top-level of the main window view ( decorview must be a layout container because it will accommodate the other view ). When activity call setcontentview ()
The Setcontentview () method of the Window object , which executes the method to add a user-defined View to the Decorview The final completion of the View the display.
View: A basic building block of a user interface component that occupies a rectangular area on the screen , which is the base class for the UI control, such as a button or text box. View is responsible for graphical interface rendering and event handling
Android has provided us with a range of standard UI controls for direct use, and we can also inherit from the view or view subclass, to implement our own custom UI Control
ViewGroup: View Group in Android. Contains more than one View, or it can contain viewgroup.
ViewGroup is a special view that can accommodate other view ( child controls ), which is the base class for layout and view containers
* Viewgroup.layoutparams Layout parameter class properties:
Android:layout_width Width relative to the parent control (wrap_content, match_parent,fill_parent)
Android:layout_height relative to the parent control height (wrap_content,match_parent,fill_parent)
* Common methods of ViewGroup
AddView (): Adding a view to a group of views
Removeview (): Remove view from the Views group
Getchildcount: Get the number of view group child controls
Getchildat (): get a specific child control
viewgroup is a subclass of View in Android , and the layout manager is ViewGroup sub-class.
The relationship between activity Window View ViewGroup in Android