listView的item含有surfaceView,黑屏的问题的解决方案

解决方案:

第一步:给窗口Window设置getWindow().setFormat(PixelFormat.TRANSLUCENT);一般在Activity的onCreate()中设置

第二步:同时给getHolder().setFormat(PixelFormat.TRANSPARENT);给SurfaceHolder设置

只有两个同时设置才会起作用。

 

 

<a href=http://m.blog.csdn.net/blog/longyc2010/42468485>

[原]fragment切换到含有surfaceView的fragment,黑屏的问题的解决方案

</a>

猜你喜欢

转载自wuxifu001.iteye.com/blog/2227609