Thx Rob. Unfortunately I can’t find a setting there that will do what I want. Strangely, LightTransparentStatusBar seems to do what I want, but makes Corona SDK’s app screen overlap the system buttons. See screenshot from the StatusBar sample app, taken on a Nexus 6P running Oreo 8.1.0.
DefaultStatusBar will behave differently and overlap the top of the screen workspace, where typically there’s a Back button or Menu button, which is why I can’t use it for non-game apps.
This is my config.lua:
local newh=math.floor(320\*display.pixelHeight/display.pixelWidth) application = { content = { width = 320, height = newh, scale = "letterBox", fps=60, }, }
If I subtract display.topStatusBarContentHeight from newh, it removes “too much”; there’s more black space at top and bottom than it should be, and it seems it centers the display vertically, which means that even if I calculate the amount to subtract, I can never use the full space between the statusbar and the system buttons.
I suppose I could use the default statusbar, and modify all the views to put a black strip behind it and adapt the screen content to suit for each one. Will this work the same on Iphone and Ipad, if I read the status bar height dynamically?
If the behavior is fixed/changed, then of course I’d have to do the same work again, or at least put some conditional to do the strip and moving content or not. If there’s a good way to solve this, I’m very interested since I did all the views and didn’t check on device until nearing completion. Cheers.
It seems to me like if you subtract half the status bar height (as reported) and align the top of the application content area to the bottom of the status bar, it would display correctly/as expected on devices.