在表面视图中看不到背景 [英] Background not visible in surface view
本文介绍了在表面视图中看不到背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试将自定义视图添加到框架布局时,我创建了一个扩展表面视图的视图,框架布局背景不可见..请为我提供解决方案.
I have created a view which extends surface view when i am trying to add the custom view to frame layout , frame layout back ground is not visible.. please provide me a solution.
推荐答案
您必须在曲面视图中自己渲染背景.正如文档所述:
You have to render the background by yourself within the surface view. As the documentation says:
SurfaceView在其窗口上打一个孔,以显示其表面.
the SurfaceView punches a hole in its window to allow its surface to be displayed.
因此,不会渲染放置在表面视图后面的任何内容.
So nothing that is placed behind a surface view would be rendered.
这篇关于在表面视图中看不到背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文