Skip to content

Android GodotFragment can't have a transparent background #106703

Closed
@lonevox

Description

@lonevox

Tested versions

  • Reproducible in: 4.5-dev4, 4.2.2-stable

System information

Godot v4.2.2.stable.mono - Linux Mint 21.3 (Virginia) - X11 - GLES3 (Compatibility) - AMD Radeon RX 6800 (navi21, LLVM 15.0.7, DRM 3.57, 6.8.0-57-generic) () - AMD Ryzen 5 7600 6-Core Processor (12 Threads)

Issue description

A GodotFragment in an Android app can't be given a transparent background with android:background="@android:color/transparent" as well as having the Godot project allow per-pixel transparency with the following project settings enabled:

  • display/window/per_pixel_transparency
  • display/window/size/transparent
  • rendering/viewport/transparent_background

Running the Godot project from the editor, I correctly get a transparent background on Linux:

Image

However, on Android the background shows as black (I've added an image behind the GodotFragment container so I should be able to see it if Godot's background is transparent):

Image

Steps to reproduce

  1. Clone my fork of the GLTF Viewer.
  2. In Android Studio, open the project and sync Gradle.
  3. Run the apps.gltf_viewer run configuration.
  4. Observe that the image of the Godot icon isn't visible behind the GodotFragment, and instead the area that should be transparent is black.

Minimal reproduction project (MRP)

I've modified the GLTF Viewer referenced in the docs with these changes. My fork can be found here.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions