Search code examples
androidopengl-esaugmented-realityrajawaliandroid-camera2

Rajawali transparent background of "RajawaliTextureView" (Augmented Reality)


I want to display a "RajawaliTextureView" over a Camera2 API preview (also TextureView), but the the background isn't transparent. The result is a black background and I can't see the camera preview.

How can I make a transparent background of the RajawaliTextureView?


Solution

  • This is not possible with a TextureView. Even if you render a transparent clear color, it will be against a white background because of how Android uses texture views in its drawing system.

    Please read https://github.com/Rajawali/Rajawali/wiki/Using-RajawaliSurfaceView-and-RajawaliTextureView#which-one-to-use