Skip to main content
GameDev.net gamedev.net
🔒 Locked

Problem with Libgdx screen sizing

Started by charlie8 Sep 14, 2021 at 2:08 PM 2 replies 6.5k views
Original Post
charlie8
charlie8

I have a game that works well, except on small screens. When I bring up the first Screen, it looks like this on small devices:

Initial screen on small device

If I click on any of these buttons, that bring up some pretty basic screens, and then go back to the original screen, the screen is displayed properly. And there are no issues from then on:

The correct display

I am new to libGDX on android, so I know I don't know what is going on. The rest of the game is working properly, It is only on small screens (768x1024 or so) that it has this issue.

I have also noticed that occasionally, this first screen will come up oriented incorrectly on a device if it was not oriented horizontally. After selecting another screen though, everything works great in this case as well. I am sure I am missing something basic.

I'd be happy to post some code, if I knew what code to post. Thanks

Shaarigan
Shaarigan

Sounds like screen information are read before they're set properly by Android. I'm not experienced with libGdx but could you post your initialization code?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.