Question about the screen resolution of Android 11 devices.

This is the screen of running the “Hello World” Samples Code on the “Redmi Note10 pro” device.

I don’t want the black spaces the “letterbox” has.
I changed the config.lua file.

-- scale = "letterbox",
scale = "adaptive",

I hate the space at the bottom, so I added the code below.

if system.getInfo( "platform" ) == "android" then
    native.setProperty("androidSystemUiVisibility", "immersiveSticky")
end

Below is the output. The image is stretched.

Is there any way to solve this problem?

Another interesting thing is that the image doesn’t stretch on other Galaxy android devices. (Android 11)

I tried adding the code below, but still the image is stretched.

-- native.setProperty("androidSystemUiVisibility", "immersiveSticky")
native.setProperty("androidSystemUiVisibility", "immersive")

.

local function onResize( event )
	world.width = 250
	world.height = 250
end

Runtime:addEventListener( "resize", onResize )

I might be wrong but I think you are looking at the wrong place. Look at the config.lua and the value of scale. This documentation might also help:

Thanks agramonte!
I read the guide that you gave me.

Still I think it is a bug in some Android devices that the aspect ratio is ignored (like “zoomStretch”) due to hiding the bottom navigation bar.

Anyway, I added the code below to get a normal aspect ratio Earth image. (of course… the text “Hello, world!” still stretches up and down…)

-- Abstract: Hello World
-- Version: 2.0
-- Sample code is MIT licensed; see https://solar2d.com/LICENSE.txt
---------------------------------------------------------------------------------------
local world = display.newImageRect( "world.png", 250, 250 )
world.x = display.contentCenterX
world.y = display.contentCenterY - 30

local msgText = display.newText( "Hello, world!", world.x, world.y+160, native.systemFont, 32 )
msgText:setFillColor( 0.2, 0.6, 0.8 )

        --

local first_pixelHeight = display.pixelHeight -- 2047

if system.getInfo( "platform" ) == "android" then
    native.setProperty("androidSystemUiVisibility", "immersive")
end

local function onResize( event )
	local second_pixelHeight = display.pixelHeight -- 2400
	world.height = 250 * (first_pixelHeight / second_pixelHeight)
end
 
Runtime:addEventListener( "resize", onResize )

I didn’t know much about “adaptive”.
In my game, I think it’s best to use “letterbox” and cover the “blank” area with a background image.