Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / Center Screen Vertically On Android Device Screen? "SetVirtualResolution( ScreenWidth, ScreenHeight+40 )"

Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 28th Sep 2020 15:21

Having great difficulty in supporting newer Android devices with virtual buttons and cameras built into screen,

We currently do:
SetVirtualResolution( ScreenWidth, ScreenHeight+40 )
to put an empty area on bottom of device screen so device buttons work.

Problem now is we need to do the same for the top of the device screen(for camera built into screen).
Is there a method to center game screen vertically on Android devices?
We need to have empty space on both top and bottom of Android device screen.

Let us know, thanks!

Fallen Angel Software
Video Game Design Studio
Years of Service
User Offline
Joined: 2nd Apr 2017
Posted: 30th Sep 2020 21:04 Edited at: 5th Nov 2021 12:13
From what I observed, setting SetImmersiveMode() on will make the AppGameKit app running in true fullscreen, at the same time hiding the default Android menu 'buttons'. We just need to swipe the screen from the edges to make the default Android buttons appears again. So there is no issue with buttons overlapping,
Years of Service
User Offline
Joined: 27th Apr 2020
Posted: 21st Oct 2020 17:16
I am curios how you are handling positioning of UI elements or game elements when you are setting the virtual resolution to the device width and height? Device resolution can obviously vary widely, from 1280x720 (or lower) on older devices to 3200x1440 on the galaxy s20 for example. Are you using your own percentage based system?
Car Pics Editing
User Banned
Posted: 18th Nov 2020 10:19

Login to post a reply

Server time is: 2024-03-03 20:41:13
Your offset time is: 2024-03-03 20:41:13