简体   繁体   English

索尼 bravia tv 中 Surfaceview 高于另一个 Surfaceview 交换时的问题

[英]issue when Surfaceview Above Another Surfaceview swap in sony bravia tv

在此处输入图像描述

In my sample i need to swap big player and small player when clicking swap button but small player above big player is not visible, i am setting elevation for container for the each fragment when doing swap but this does not seems like working with surfaceview but with textureview it is working,在我的示例中,我需要在单击交换按钮时交换大播放器和小播放器,但大播放器上方的小播放器不可见,我在进行交换时为每个片段设置容器的高度,但这似乎不像使用表面视图,而是使用它正在工作的纹理视图,

i have tried fix which mentioned in here我已经尝试修复这里提到的

but that fix does not work for Sony Bravia TV.但该修复不适用于 Sony Bravia TV。

A SurfaceView is "just an hole" where Android renders the Surface, so it depends of Order or Creation. SurfaceView 是 Android 渲染 Surface 的“只是一个洞”,因此它取决于 Order 或 Creation。 If you Attach_to_window the BIG SurfaceView before the SMALL one, then the second will stay over the first and there isn't any method to change this order for this Special kind of View (Android references reports that SurfaceView cannot be managed as a normal View which supports all transformations).如果您在 SMALL 之前Attach_to_window BIG SurfaceView,那么第二个将停留在第一个之上,并且没有任何方法可以更改这种特殊视图的顺序(Android 参考报告称 SurfaceView 不能作为普通视图进行管理支持所有转换)。

The only secure solution is to Detach both SurfaceViews and then re-attach them in the right order (or just swap internal Render Threads Canvas/Surface target if you're using Render Threads).唯一安全的解决方案是分离两个 SurfaceView,然后以正确的顺序重新附加它们(或者如果您使用的是渲染线程,则只需交换内部渲染线程画布/表面目标)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM