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

LottieBackgroundColor preference color parsing error in Android #804

Open
xavierserrai opened this issue Jun 13, 2024 · 0 comments
Open

Comments

@xavierserrai
Copy link

Bug report

LottieBackgroundColor preference color is not parsed properly in Android.

What steps will reproduce the problem?

Set a color in LottieBackgroundColor preference.

Expected output

The color you set in LottieBackgroundColor should be the one that you see as a lottie background color when running the app, specially in the blank space left by the status bar on startup.

What do you see instead?

This is a two layer problem. First of all Apache Cordova xml parser, XmlPull (https://www.xmlpull.org/) parses hexadecimal tags in a weird way, removing leading zeroes or adding ff characters in front of hex numbers when they are in RRGGBB format. After that, src/android/ColorHelper.kt tries to fix that but fails in doing so.

My solution was to use regular Color.parse function which seems to solve the problem.

Version information

cordova-android 13.0.0

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

No branches or pull requests

1 participant