Activity启动流程

应用进程

ActivityThread->handleLaunchActivity()
    WindowManagerGlobal.initialize()
        getWindowManagerService()
    Instrumentation.newActivity()
    Instrumentation.newApplication()
    Activity.attach()
        new PhoneWindow()
            preservedWindow.getDecorView()
    Activity.onCreate()
    Activity.onStart()
    handleResumeActivity()
        Activity.onResume()
        WindowManagerGlobal.add(DecorView)
            new ViewRootImpl()
                new View.AttachInfo()
            ViewRootImpl.setView()
                requestLayout()
                scheduleTraversals()
                doTraversal()
                performTraversals()
                    View.dispatchAttachedToWindow()
                        onAttachedToWindow()
                    performMeasure()
                    performLayout()
                    performDraw()

你可能感兴趣的:(Activity启动流程)