2013年9月15日星期日

[Android] Help : GLsurfaceview set the background transparency issues

RT, according to the online method ,
setEGLConfigChooser (8, 8, 8, 8, 16, 0);
getHolder (). setFormat (PixelFormat.TRANSLUCENT);
setZOrderOnTop (true);
Add this code after GLsurfaceview became transparent background setting , but other problems await the project is to use the frame layout is probably the lowest level of a imageview as a background ( guaranteed to see the background , so it let GLsurfaceview transparent ) , then GLsurfaceview, only then, button , etc. , setZOrderOnTop (true); after this set , will lead GLsurfaceview went to the top floor , blocking the button and other controls , to ask you a great God, to solve this problem ah Zage ~
------ Solution --------------------------------------- -----
demo.setZOrderOnTop (true) ;/ / will be placed in the top view
demo.getHolder (). setFormat (PixelFormat.TRANSLUCENT) ;/ / Set Transparent
Some versions are not effective , high version you can !
------ eference --------------------------------------- < br>
demo.getHolder (). setFormat (PixelFormat.TRANSLUCENT) ;/ / set transparent , but demo.setZOrderOnTop (true) still do not have this , then turn opaque ~ this view into the top of the block the button ......
------ eference ------------------------------------ ---
not encountered this situation , so if the button is not done GLsurfaceview inside, how is transparent , button bar is visible , unless there are controls overlap
----- - eference ---------------------------------------
 relatives ah
I have encountered such a problem , if you can discuss the next
If you have a solution that provides trouble under
------ eference -------------------------- -------------
solutions to this problem yet ? Jia. . . . . . . .

没有评论:

发表评论