多个SurfaceView层叠显示问题
来源:互联网 发布:局部搜索算法计数器 编辑:程序博客网 时间:2024/06/03 16:11
当场景中有多个SurfaceView的时候,上层的SurfaceView可能会被下层的遮挡,这个时候需要使用setZOrderOnTop(true)或者setZOrderMediaOverlay(true)来控制SurfaceView的显示层次。
Android SDK对两个函数的描述:
public void setZOrderOnTop (boolean onTop)
Control whether the surface view's surface is placed on top of its window. Normally it is placed behind the window, to allow it to (for the most part) appear to composite with the views in the hierarchy. By setting this, you cause it to be placed above the window. This means that none of the contents of the window this SurfaceView is in will be visible on top of its surface.
Note that this must be set before the surface view's containing window is attached to the window manager.
Calling this overrides any previous call to setZOrderMediaOverlay(boolean)
.
控制这个surfaceView是否被放在窗口顶层。通常,为了使它与绘图树整合,它被放在窗口之后。通过这个函数,你可以使SurfaceView被放在窗口顶层。这意味着它所在的窗口的其他内容都不可见。(注:可以设置surfaceView透明来使其他内容可见)
这个函数必须在窗口被添加到窗口管理器之前设置。
调用这个函数会使之前调用的setZOrderMediaOverlay(boolean)无效;
public void setZOrderMediaOverlay (boolean isMediaOverlay)
Control whether the surface view's surface is placed on top of another regular surface view in the window (but still behind the window itself). This is typically used to place overlays on top of an underlying media surface view.
Note that this must be set before the surface view's containing window is attached to the window manager.
Calling this overrides any previous call to setZOrderOnTop(boolean)
.
控制这个surfaceView是否被放在另一个普通的surfaceView上面(但是仍然在窗口之后)。这个函数通常被用来将覆盖层至于一个多媒体层上面。
这个函数必须在窗口被添加到窗口管理器之前设置。
调用这个函数会使之前调用的setZOrderOnTop(boolean)无效。
- 多个SurfaceView层叠显示问题
- 多个QtWidget层叠显示,置顶,置底,Lbel显示图片
- SurfaceView 画线不显示问题
- Stacking Notifications(层叠多 个Notification)
- 多个SurfaceView的切换除了问题(因为第一个surfaceview总是在最上面,切换时后面的surfaceview就没效果了)
- 关于SurfaceView横竖屏切换显示问题
- ProgressBar自定义样式中的层叠图片显示问题
- ProgressBar自定义样式中的层叠图片显示问题
- 自定义Toast,防止层叠显示问题,和自定义Toast样式
- linux 模块层叠技术和多个ko的编译
- Extjs多个tab页面——panel层叠
- Android 设置背景之layer-list,层叠多个背景
- SurfaceView问题
- 两个SurfaceView显示预览的问题 setZOrderMediaOverlay(true)
- surfaceview叠加问题(地图上显示视频)
- SurfaceView控件在部分机型上不能显示问题
- surfaceview叠加问题(地图上显示视频) +fragmet
- CListCtrl一行显示多个图标问题
- Linux内存使用详解
- MFC使用技巧(如何删除一个类)
- 问题驱动的软件测试设计:过程详解
- http://blog.csdn.net/wangyf101/article/details/9790807
- 常见HTTP状态(304,200等)
- 多个SurfaceView层叠显示问题
- Java 基础2
- 看着别人手拿大把的offer,不淡定了怎么办?
- 异常的处理原则
- 内核处理信号对应用层堆栈的影响
- windows下cvs服务器安装配置
- ace日志详细解读
- Makefile语法简介
- C 语言中的指针和内存泄漏