A little understanding of the individual:
1, the activity corresponds to an application interface, but itself more belongs to the control;
2, view is the basis of all UI elements, the subclass of view becomes "Widget", all ViewGroup subclasses become "Layout";
3 window refers to a rectangular display area, usually there are two, one is the entire phone screen, the other is the type of dialog box;
4. Activity Associates a window, which invokes the Makenewwindow method when it is created, and returns a Phonewindow object (the only implementation of the window abstract class);
4.1, in Phonewindow will first create a decorview (the top layer is a linearlayout), the view draws the basic interface of the phone, such as the status bar, the interface is drawn first, relying on the definition of manifest theme;
4.2. When the activity calls Setcontentview, it is actually drawn by window in the content area of the Decorview (a framelayout under the top linearlayout); When we add UI elements to a custom layout, Essentially, the Framlayout object is AddView (); The real setcontentview should be this:
GetWindow (). Setcontentview (Layoutinflater.from (this). Inflate (R.layout.main, null));
Where Layoutinflater is a class used to instantiate an XML layout file as a View object
4.3, window will create the view root object and Windowmanagerservice, understand is to register their activity Phonewindow to the System window management, so that can be recalled to different system events, such as button lights
Foundation (2, Activty\windows\view relationship)