Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent backgrounds not working on Xiaomi devices in Versions > 6.4.0 #2587

Open
liviamoliveira opened this issue Dec 2, 2024 · 7 comments

Comments

@liviamoliveira
Copy link

It has been identified that from version 6.4.0 onwards, transparent backgrounds are no longer functioning correctly on Xiaomi devices. This issue impacts visual rendering, causing transparent backgrounds to appear opaque or behave unexpectedly.

Steps to Reproduce:

  1. Update the application to a version higher than 6.4.0.

  2. Test any component using a transparent background on a Xiaomi device (MIUI).

  3. Observe that the background does not render as expected.

Expected Behaviour:
Transparent backgrounds should display correctly without altering the appearance of UI components.

Affected Devices:

Issue reproduced on Xiaomi devices running MIUI.

Additional Notes:

This may be related to specific MIUI configurations in newer versions or changes in the library managing visual styles within the application.

This behaviour has not been observed on devices from other manufacturers or in versions prior to 6.4.0

Impact

This issue could affect the user experience, particularly in areas of the application where transparency is integral to the design and usability.

Suggested Actions:

  1. Investigate whether transparency rendering is impacted by changes in the library or API.

  2. Verify compatibility with specific MIUI configurations.

  3. Implement a workaround for Xiaomi devices or conditionally handle the behaviour based on manufacturer/system detection.

Priority: High

Assigned To: Designate a team responsible for UI/compatibility.

Please comment or update the progress as needed.

@gpeal
Copy link
Collaborator

gpeal commented Dec 3, 2024

  • Have you tried this on non-Xiaomi phones?
  • Can you attach an animation that reproduces this?
  • Can you try setting the render mode to software?
  • Does it work before 6.4.0?

@dpatel-mercari
Copy link

I've a similar issue(black background color instead of transparent) after upgrading the lib version from 6.4.0. However, using the render mode to software fixes the issue.

@gpeal
Copy link
Collaborator

gpeal commented Dec 6, 2024

@dpatel-mercari Can you confirm exactly which version it broke in? Did it work in 6.5.2? Can you attach an animation that is broken?

@dpatel-mercari
Copy link

@gpeal
Version 6.4.0: Working
Version 6.5.2: Not working. Shows black background if we do not use the render mode to software
Version 6.6.1: Not working. Shows black background if we do not use the render mode to software

I'm using lottie animation in Compose android app using below function the lottie file is from URL.

val composition by rememberLottieComposition(
        LottieCompositionSpec.Url(lottieUrl)
    )

    val progress by animateLottieCompositionAsState(
        composition = composition,
        iterations = LottieConstants.IterateForever,
    )

    LottieAnimation(
        composition = composition,
        progress = { progress },
        modifier = Modifier.size(width = 120.dp, height = 120.dp)
    )

@gpeal
Copy link
Collaborator

gpeal commented Dec 15, 2024

Can you attach an animation that reproduces this and can you try setting the render mode to software?

@dpatel-mercari
Copy link

Sorry, I can't attach an animation but I've shared the code which causes the issue. My animation has a character and background is transparent. As I shared earlier, setting the render mode to software working without any issue.

@gpeal
Copy link
Collaborator

gpeal commented Dec 17, 2024

@dpatel-mercari Without an example animation, I won't be able to help you. Feel free to edit your json to remove anything that isn't necessary to demonstrate the issue or have your designer make something simple that also reproduces it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants