美文网首页
Activity启动流程

Activity启动流程

作者: 董江鹏 | 来源:发表于2020-10-23 13:41 被阅读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()

相关文章

网友评论

      本文标题:Activity启动流程

      本文链接:https://www.haomeiwen.com/subject/cyjvmktx.html