Adjusting Application according to Status Bar

Hey, folks. Newbie here.

I am currently working on an application that will open like most social media apps do–so it is key for the status bar to be showing at all times, however, I’ve run into an interesting issue.

I can adjust my app and compensate for the Status Bar across most apps, however, the app itself is technically still in fullscreen and I would like to adjust that if at all possible.

I changed my config.lua file (based off the Ultimate config file) which gave me some interesting results, however, the app still opens in full screen. Example:

As you see here, the image at the top is cut off by the status bar. However, it is technically still there and viewable. If you simply go to switch apps…

You can see in those applications an example of both. The top app compensates for the status bar, and the bottom app does not, yet you can see the rest of the image. This tells me that display.setStatusBar(display.DefaultStatusBar) simply overlays onto the app rather than pushing the app down and minimizing the screen size.

Thank you all in advance!

Has no one tried to make an app that leaves the status bar open? I feel as though there is either a very obvious solution to this or most devs just opt for the fullscreen. Has anyone tried to make this work?

Hi Scotty,

You can use the following API to get the height of the status bar: “display.topStatusBarContentHeight”  

Then all you need to do is take that extra bit of space into account while positioning your UI. 

Hope that helps!

Jamie

I understand using the height of the status bar when position items in the app, but that simply leaves empty space. The app is still technically open in full screen, but the space you calculated from the status bar height is covered up by the status bar itself. This may seem negligible, however, some ui elements of most phones will show the unused space–as shown in my pictures in the OP.

Does this make sense? I know it seems pointless, but I look to be as thorough as possible when developing.

Has no one tried to make an app that leaves the status bar open? I feel as though there is either a very obvious solution to this or most devs just opt for the fullscreen. Has anyone tried to make this work?

Hi Scotty,

You can use the following API to get the height of the status bar: “display.topStatusBarContentHeight”  

Then all you need to do is take that extra bit of space into account while positioning your UI. 

Hope that helps!

Jamie

I understand using the height of the status bar when position items in the app, but that simply leaves empty space. The app is still technically open in full screen, but the space you calculated from the status bar height is covered up by the status bar itself. This may seem negligible, however, some ui elements of most phones will show the unused space–as shown in my pictures in the OP.

Does this make sense? I know it seems pointless, but I look to be as thorough as possible when developing.