Android Question Green screen of death ! (GSD)

MitchBu

Well-Known Member
Licensed User
Longtime User
When the device screen is turned off, either because it times out, or the user pushed the sleep button, and when the device is turned on again, I get what I call the Green Screen of Death:

BSD.jpg


As you can see, Activity title remains set, but nothing shows.

More bizarre is that the controls are still there. I can verify they are initialized.

But nothing I do can show them back. I tried RequestFocus to no avail. It does return true, but I wonder where it shows!

Is there any way besides my human eyes, but in code, I can detect that condition, so I remove all views, and reload the layout ?

I searched the forum, but there does not seem to be any post yet.

Any idea ?

TIA
 

MitchBu

Well-Known Member
Licensed User
Longtime User
Post your code, to see if someone can help you.

My code is as simple as
B4X:
Activity.Loadlayout("Check")

It does display fine until the screen is turned off. When the screen is turned back on, the layout is gone, and the screen is green like I posted.

In code, I can verify the views are still there, but they are invisible.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
My code is as simple as
You are making a classic mistake in assuming that that line of code is where the problem is located and not showing us the full context of its location in other code. It is unlikely to be that line as LoadLayout has obviously run succesfully as the views are initialised. My best guess would be an elevation problem - but I too am then making assumptions without seeing the full code for at least Activity_Create and Activity_Resume!
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Any chance you can post a small project showing the issue.

The problem may be in the layout file itself.
 
Upvote 0
Top