You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this option I see the background color but the model hides other views because the UiHelper sets surfaceView.setZOrderOnTop(true)
covering.webm
2. SkyBox
I set the SkyBox color to the color of the background view (not actually transparent but I got what I needed) modelViewer.scene.skybox = Skybox.Builder().color(1f, 1f, 1f, 1f).build(modelViewer.engine)
This does not hide other views but I see a black screen for a second (which I don't see with isOpaque = false option),
visible.webm
How do I avoid the black screen and still get transparent background?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I need a transparent background (background color of SurfaceView should be visible). I tried two approaches,
1. Setting
UiHelper.isOpaque = false
With this option I see the background color but the model hides other views because the UiHelper sets surfaceView.setZOrderOnTop(true)
covering.webm
2. SkyBox
I set the SkyBox color to the color of the background view (not actually transparent but I got what I needed)
modelViewer.scene.skybox = Skybox.Builder().color(1f, 1f, 1f, 1f).build(modelViewer.engine)
This does not hide other views but I see a black screen for a second (which I don't see with
isOpaque = false
option),visible.webm
How do I avoid the black screen and still get transparent background?
Beta Was this translation helpful? Give feedback.
All reactions