[Android] [Lime] Screen cropped on start

When I start my app from the menu on a Moto G 2014 with Android 6, the top and bottom are cropped. It’s as though the surface has not been resized properly even though the screen dimensions are reported correctly. If I minimise and then maximise, I get the bottom of the screen back to normal but not the top.

It looks like something to do with the OS buttons at the bottom of the screen and the title bar added to the preview in the open windows menu (square button in marshmallow). It doesn’t happen every time but a good 80% of attempts at opening the app produce a cropped surface.

I’m using Lime from github.

I tried to recreate using SimpleImage but that just crashed immediately.

I managed to recreate this in SimpleImage (remove the preloader.complete from the first if in render). When I launch the bottom menu part of the screen stays black. If I minimise then maximise, the bottom part is now coloured white and the image has moved down about the same amount as I see cropped off the top of my app.

Has anyone else noticed the same thing?

Something similar happens to me on a Nexus 6p: Android orientation problem when game resumes

I’ve been trying different versions of Lime and it looks like Lime <= 2.8.3 didn’t count the virtual buttons at the bottom of the screen as usable screen space but as of 2.9.0 it does. It looks like Lime 2.9.0 started hiding the buttons in a different way but it has confused the renderer with the amount of space it has. Possibly because it takes a second or two for the buttons to be removed?

I’ll add an issue on github

1 Like

What version of Openfl are you usign with lime 2.8.3?

With version 3.6.0 it gives me the following error:
C:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/display/BitmapData.hx:1132: characters 160-166 : Too many arguments
C:/HaxeToolkit/haxe/lib/openfl/3,6,0/openfl/display/BitmapData.hx:1130: characters 2-213 : A return is missing here

I’m not actually using OpenFL, I’m using Lime directly but you could keep stepping back versions until it works for you. Trying to roughly match the dates on github I think you need 3.5.3.