Incorrect definition of full screen size. Empty area on the height of the navigation bar.

Hi all. Faced the problem of the appearance of a gray line equal in height to the bottom navigation bar.
Device: Redmi note 10 pro, 2400x1080
Project files:

config.lua
application = {
	content = {
		scale = "adaptive",
	}
}
main.lua
-- native.setProperty( "androidSystemUiVisibility", "immersiveSticky" ) 
local rect = display.newRect(display.contentCenterX,display.contentCenterY, display.contentWidth, display.contentHeight)
rect.fill = {.5,.7,0}

local circle = display.newCircle(display.contentCenterX,display.contentCenterY, 100)

local rect = display.newRect(display.contentCenterX,display.contentHeight, 100, 100)

When using scale=“adaptive” I get the following result:

If I hide the bottom panel with “immersiveSticky” then all the content is scaling:

…
Then I tried using letterBox - 320x480

config.lua
application = {
	content = {
		width = 320,
		width = 480, 
		scale = "letterBox",
	}
}

Without the immersiveSticky:

With immersiveSticky:


The content is also scaled when the navigation bar is hidden.

Hence the question, how to hide the bottom bar without scaling the content? Or how to display objects over the gray area?

I suggest you try to test with Solar2D 2020.3618
If this solves the problem then you are experiencing a problem likely introduced with 64d8f70 which appears with some display configurations. I have not been successful finding sufficient information to be able determine the cause of this problem and why it happens on some devices, for this reason I have not created a new issue for this problem. Also this problem might be related to issue #169

1 Like

Maybe try create display objects in composer scene in another file than main.lua

Have a nice day:⁠-⁠)

I also use the “Adaptive” scale and I don’t have this problem, however, I don’t use it in main, I use it in other scenes with compose

These files were a demonstration of the error that I encountered. This issue is not related to running from main.lua and is not related to composer.

Most likely @ernst3 is right. Later, I will test solar2d 2020.3618 and solar2d latest release, on a device with regular and non-standard screen ratios.

I forgot to mention that the build setting “coronaWindowMovesWhenKeyboardAppears” seems to be another factor that influences the screen dimensions.