Launcher8.0启动流程的第四步,第3小步同样服务于第四步setupView,创建UI的各个模块,各个模块在Launcher.xml作为一个整体存在。所以将各模块创建好,整体也自然而然的创建好了。
第三小步源码如下:
mWorkspace.setHapticFeedbackEnabled(false);
mWorkspace.setOnLongClickListener(this);
mWorkspace.setup(mDragController);
mWorkspace.lockWallpaperToDefaultPage();
mWorkspace.bindAndInitFirstWorkspaceScreen(null /* recycled qsb */);
mDragController.addDragListener(mWorkspace);
mDropTargetBar = (DropTargetBar) mDragLayer.findViewById(R.id.drop_target_bar);
mAppsView = (AllAppsContainerView) findViewById(R.id.apps_view);
mWidgetsView = (WidgetsContainerView) findViewById(R.id.widgets_view);