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

A glitchy grey background on Launch and Resume, on Android 11 #387

Open
IlSui opened this issue May 1, 2022 · 3 comments
Open

A glitchy grey background on Launch and Resume, on Android 11 #387

IlSui opened this issue May 1, 2022 · 3 comments

Comments

@IlSui
Copy link

IlSui commented May 1, 2022

The glitch looks like a rectangle filled with grey (a gradient colour).
I think it could be some kind of default background for Solar2D apps.

It appears for a very short time on Launch and Resume.
photo6014703172783815011

Or it remains visible for the whole session if you don't handle the resizing after the status bar is hidden.
photo6014703172783815000

To reproduce: build anything and run it on Android 11.

We can't be sure it affects Android 11 only and if this is valid for all Android 11 devices, but we tested on different models.

@IlSui
Copy link
Author

IlSui commented May 1, 2022

In addition,
if I set the background to white, it behaves like a mask over my phone background.
(hiding all other apps icons)
photo6014703172783815086

This turns from transparent to white like a transition on alpha.
And it happens very fast. I noticed it only recording and slowing it down.

Maybe this has something to do with my OS apps launcher someway.

@IlSui
Copy link
Author

IlSui commented Oct 16, 2022

An update that may give you some clue:
if the main.lua performs heavy operations, you have more chance to see that grey area.
If the main.lua is neat and postpone the loading of the game, then there are chances you won't notice it.

@XeduR
Copy link
Contributor

XeduR commented Oct 16, 2022

Just to point this out, this isn't just an Android 11 issue. I'm experiencing this on my Android 8.x and 9.x test devices as well. If I had to guess, I'd wager this issue is caused by a simple setBackgroundColor in some .java file. A quick search returns some possible options:

https://github.com/coronalabs/corona/search?q=Color.DKGRAY
https://github.com/coronalabs/corona/search?q=Color.GRAY

This issue appears when the app launches or resumes. On launch, even if you have a default project with an empty main.lua, you'll see this for a moment. If you have a main.lua with a lot of code in it, you'll see the dark grey background significantly longer.

Based on this, it's probably safe to assume that the dark grey background color gets overwritten by Solar2D's default background color once the app gets to the next draw cycle. Or, in other words, if the app needs to process a lot of code in main.lua, that may lock the thread for tens or hundreds of milliseconds, which will delay the next draw cycle enough to make the dark grey background clearly visible to the user.

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

2 participants