Problem with Libgdx screen sizing

Started by
2 comments, last by Shaarigan 2 years, 7 months ago

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

Advertisement

If you want to try the game, it is in open test on the play store:

Ancient War - Apps on Google Play

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?

This topic is closed to new replies.

Advertisement