NO1:
Separates the construction of a complex object from its representation so that the same build process can create different representations
No2:
In the Android source code, the most commonly used Builder mode is alertdialog.builder
No3:
The concrete implementation of WindowManager in the Java layer is that the Setwindowmanager function of the Windowmanagerimpl,window object links the Window object to the WindowManager
Adding a view, removing the view, updating the layout of the view, and so on, gave the Windowmanagerglobal this class
The AddView method of WindowManager actually calls the AddView method in Windowmanagerglobal
Call Viewrootimpl's Setview method to display the view to the phone window
No4:
Viewrootimpl inherits from the handler class as a bridge for communication between the native layer and the Java Layer View system
NO5:
The Android framework and the Windowmanagerservice are also communicated through the binder mechanism.
NO6:
Windowmanagerservice manages not window, but view, but it manages the view that belongs to a window.
No7:
In the draw () function, you get the area you want to draw, and you decide whether to draw using the GPU. In general, CPU drawing is used, which is called the Drawsoftware function to draw.
No8:
View Tree Drawing steps :
1) Decide whether to use CPU drawing or GPU drawing
2) Get the Surface object for drawing surfaces
3) Get and lock canvas drawing objects from surface objects
4) Start the whole tree drawing process from Decorview
5) Surface object unlocks canvas and notifies Surfaceflinger to update view
No9:
Windowmanagerservice system
No10:
Advantages :
1) Good encapsulation, using builder mode allows the client to not need to know the details of the internal composition of the product
2) builders are independent and easy to expand
cons : Generates redundant builder objects and director objects, consumes memory
"Android Source design mode"--builder mode