0 Favourites

How do I disable auto-rotate on android?

  • I'm using XDK and I can force portrait, but I can't figure out how to disable auto-rotate. If it rotates with the force portrait setting (via C2 layout properties, browser plugin and even third-party plugin for XDK) the game rotates to landscape with the game in the centre with huge bars either side. Any ideas how to disable auto-rotate?

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • You need to select portrait in the build settings of XDK.

  • Construct 2, properties, and you can set Orientation Lanscape or Potrait only (default "any") it's help?

  • I did that but the screen still rotates, I can confirm that other apps from the store can lock my screen, but XDK isn't doing it right :/

  • Construct 2, properties, and you can set Orientation Lanscape or Potrait only (default "any") it's help?

    You need to select portrait in the build settings of XDK.

    I tried both these and added the screen orientation plugin, but it still twists the screen so there's black bars either side (I'm mentioning this so you know it's not turning my game widescreen, it's just not locking the orientation).

  • > Construct 2, properties, and you can set Orientation Lanscape or Potrait only (default "any") it's help?

    >

    > You need to select portrait in the build settings of XDK.

    >

    I tried both these and added the screen orientation plugin, but it still twists the screen so there's black bars either side (I'm mentioning this so you know it's not turning my game widescreen, it's just not locking the orientation).

    If you built it for Crosswalk, did you make sure you changed the tab of build settings to 'Android (crosswalk)' and didn't accidentally set things up for normal Android build? That tab is open by default and I sometimes accidentally set things up there.

    If you still can't get it to work, you should probably ask about it at the XDK forums as well:

  • >

    > > Construct 2, properties, and you can set Orientation Lanscape or Potrait only (default "any") it's help?

    > >

    >

    > > You need to select portrait in the build settings of XDK.

    > >

    > I tried both these and added the screen orientation plugin, but it still twists the screen so there's black bars either side (I'm mentioning this so you know it's not turning my game widescreen, it's just not locking the orientation).

    >

    If you built it for Crosswalk, did you make sure you changed the tab of build settings to 'Android (crosswalk)' and didn't accidentally set things up for normal Android build? That tab is open by default and I sometimes accidentally set things up there.

    If you still can't get it to work, you should probably ask about it at the XDK forums as well:

    Yeah, performance is a lot better disabling standard Android and just using Crosswalk, but no luck fixing it to portrait even when the phone is on it's side. The emulator also doesn't lock the orientation :/

  • Any step-by-step instructions to ensure the screen stays portrait at all times?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)