当我尝试将自定义 View 添加到框架布局时,我创建了一个扩展表面 View 的 View ,但框架布局背景不可见。请提供解决方案。
最佳答案
你必须在表面 View 中自己渲染背景。作为documentation说:
the SurfaceView punches a hole in its window to allow its surface to be displayed.
所以放置在表面 View 后面的任何东西都不会被渲染。
关于android - 背景在表面 View 中不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5243958/