Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have multiple classes that implement Screen.

I want to, say, have the Main Menu screen portrait, then the Play Screen landscape. Is there anyway of changing the orientation dynamically?

I thought I could just start another Activity and have the Play Screen extend Game. And the new Activity would intialize the Play Screen. But it appears that you can't call startActivity or the like, obviously, as LibGDX is platform independent.

I use and to align Sprites and Actors so it looks "right" on different devices.

I've also tried swapping the and, respectively, but can't seem to get the position of sprites and actors correct.

share|improve this question
May be useful check below link – user84290 Jun 2 at 8:30
May be useful check below link – aryan Jun 2 at 8:32

I figured out how to do it.

I used an interface as shown at this link

Basically, I created an interface in the core project, then for each back-end project I implements my interface.

To change the orientation in Android is simple as shown here

That is, setRequestedOrientation(ActivityInfo.<THE_ORIENTATION>)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.