一个activity可以拥有一个或者多个window(如使用popup dialog)
另外,android支持surfaceView,这样一个window就可以拥有多个surface了
window->view hierachy(DecorView是tree的root)->ViewRoot->Surface
                              某一个view->surface
surfaceview是在view hierachy中embedded的surfacesurfaceView类似于symbian中的DSA,直接访问surface
普通的是通过view访问surface
window manager会通过layer协调各个surface画图到frame buffer中去http://www.devdiv.net/bbs/thread-25883-1-1.html

解决方案 »

  1.   

    就是说
    一个activity对应一个或多个window,
    一个window对应多个surface,
    一个view对应一个surface?
    还是对view和surface的关系不太清楚,可不可以麻烦讲详细一点?
      

  2.   

    The surface is Z ordered so that it is behind the window holding its SurfaceView; the SurfaceView punches a hole in its window to allow its surface to be displayed. The view hierarchy will take care of correctly compositing with the Surface any siblings of the SurfaceView that would normally appear on top of it. This can be used to place overlays such as buttons on top of the Surface, though note however that it can have an impact on performance since a full alpha-blended composite will be performed each time the Surface changes. 
    可以看看sdk文档的介绍
      

  3.   

    英文啊
    您就直接告诉我吧,我得理解:
    一个activity对应一个或多个window,
    一个window对应多个surface,
    一个view对应一个surface
    对不对?
      

  4.   

    http://th8410.javaeye.com/blog/702856
      

  5.   

    http://hi.baidu.com/%D3%B0%D7%D3%B9%FA%B6%C8/blog/item/44881128b234c3f298250a02.html
    http://hi.baidu.com/%D3%B0%D7%D3%B9%FA%B6%C8/blog/item/65d4864a24ca50fc83025c1a.html