Activity启动流程

2020-10-23  本文已影响0人  董江鹏

应用进程

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()
上一篇 下一篇

猜你喜欢

热点阅读