What is activity?
Activity is a visual interface for user operations, and it provides a window for users to place views and interact with each other. It is provided using Setcontentview method. Therefore, you can understand the activity, Window, view three relationships. The activity provides a window and the view is added to the window.
Example of a brush wall:
Activity can be understood as the room, window is the walls of the room, we can brush a variety of different patterns on the wall, these patterns are view.
Loading process for Activity view
1, the activity at the beginning of the creation, called the Attach method, this time, for the activity created a phonewindow, and for Phonewindow set up the return of event interaction.
2, immediately after the activity of the OnCreate () method is returned. Here it is, too. We often replicate the method, we call Setcontentview (ID) in OnCreate ().
3. In Setcontentview (), Phonewindow creates a subclass of the top-level view Decorview (Framelayout).
4, immediately, Decorview will be based on some feature (similar to No_acticon_bar) to add a layout. This layout contains the title, content. The content is also framelayout, which is the parent container in which we add the view in Setcontentview (ID).
So we have to set the implementation to full screen before Setcontentview
GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_ fullscreen);
Implement a untitled bar (but with the system's own taskbar):
Loading process for Android view