1. Launcher Overall structure
Desktop programs do not actually include desktop wallpaper, desktop wallpaper is actually provided by Wallpapermanagerservice, the entire desktop is actually superimposed on the entire desktop wallpaper on the other layer.
1.1 WorkSpace
Launcher the root of the entire layout is Draglayer,draglayer inherits Framelayout, so Draglayer itself can be seen as a framelayout. Here is Dock_divider, which contains another layout file workspace_divider.xml with the Include keyword, and this workspace_divider.xml contains a imageview, in fact Dock_ The divider is the straight line above the dock area.
The following is Paged_view_indicator, which also contains the Scroll_indicator.xml, which contains a imageview, which shows a. 9 png file. This is actually the light Blue page indicator bar when launcher scrolls through the pages.
Then the desktop core container workspace, as shown, of course you see just a part of workspace, is actually a workspace_screen, through Launcher.xml can see, the whole workspace by 5 Workspace_ Screen composition, each workspace_screen is actually the corresponding desktop one page. And each workspace_screen contains a celllayout, which is a custom control that inherits from ViewGroup, so it's a layout control, which is used primarily to host our desktop icons, widgets, and folders for each page.
You can see that the workspace contains 5 celllayout from 0 to 4 by looking at the following layout structure (as the graph is too large to intercept only a fraction).
1.2 Hotseat
Next is a hotseat, which is actually the dock area. :
As we can see from the layout diagram below, this hotseat actually contains a celllayout, which is used to carry 4 icons and the middle start All Programs button.
1.3 Qsb_bar
Again, that's the Qsb_bar, the Google search box at the top of the screen. This search box is independent of the icon interface, so when we page the desktop, the search box will be fixed at the top, as shown below:
1.4 Apps_customize_pane
This is followed by an interface that was hidden at 3 initialization.
Apps_customize_pane, clicking the Show All Apps button in the dock will not transition from hidden to display state, as shown in the interface for all applications and all plugins.
By looking at Apps_customize_pane.xml, we can see that Apps_customize_pane consists mainly of two parts: Tabs_container. The tabs section, which lets us choose whether to add an application or a widget, as shown in:
Tabcontent, after selecting the appropriate tab, the following section will display the application or widget as shown:
Workspace_cling and Folder_cling is just after the machine, into the desktop, the display of the use of the wizard interface, the introduction of how to use the workspace and folder, skip will never appear again, here will not.
Http://mobile.51cto.com/hot-312129.htm
Android4.0 Launcher Source Code Analysis 1--launcher overall structure