How do I LOCK ORIENTATION????

Get help using Construct 2

Post » Sat Feb 13, 2016 8:27 pm

i made an app for Android
i added Orientations: portrait
I export with cordova
Inside INTEL XDK i set the Orientation to PORTRAIT
How to prevent the app to rotate when im in landscape mode???
Last edited by imothep85 on Sat Feb 13, 2016 9:45 pm, edited 1 time in total.
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Sat Feb 13, 2016 9:06 pm

If you are using the "Crosswalk for Android" build, make sure you select the "Android (Crosswalk)" build settings tab. I kept making this mistake too, since it defaults to the "Android" tab.
ImageImageImage
B
71
S
22
G
240
Posts: 3,732
Reputation: 133,990

Post » Sat Feb 13, 2016 9:45 pm

its the case but nothing change Image
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Sat Feb 13, 2016 10:06 pm

Image
Last edited by blackhornet on Sat Feb 13, 2016 11:22 pm, edited 1 time in total.
ImageImageImage
B
71
S
22
G
240
Posts: 3,732
Reputation: 133,990

Post » Sat Feb 13, 2016 10:26 pm

so i changed all to Landscape, this is my app interface deigned in portrait 480,800px
Image

But this is what i get inside intel xdk when i switch to landscape
Image

and what i want is THIS when i switch from portrait to landscape:
Image

i dont want the interface to rotate when the user rotate is phone.
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Sat Feb 13, 2016 11:23 pm

Sorry I got mixed up which way you wanted, you want Portrait.
ImageImageImage
B
71
S
22
G
240
Posts: 3,732
Reputation: 133,990

Post » Sat Feb 13, 2016 11:32 pm

so my app is designed in portrait, i setup again evrything in portrait mode, but i still get the same problem in intel xdk
here its my capx file:
https://www.dropbox.com/s/4esvizck1d1izfp/Watermael_Boistfort_app01.capx?dl=0
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Sun Feb 14, 2016 2:18 am

I just tried it. It works fine. It locks in Portrait. Also, from your other thread, I'm seeing the "RETOUR" and the yellow block just fine. I've got a Nexus 7.

Are you trying this on a real device, or just the simulator?
ImageImageImage
B
71
S
22
G
240
Posts: 3,732
Reputation: 133,990

Post » Sun Feb 14, 2016 7:18 am

yeah the simulator is wrong i tested it on the mobile orientation is working but iframe are not showing me the contents screen stay black.
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Sun Feb 14, 2016 9:50 am

imothep85 wrote:so i changed all to Landscape, this is my app interface deigned in portrait 480,800px
Image

But this is what i get inside intel xdk when i switch to landscape
Image

and what i want is THIS when i switch from portrait to landscape:
Image

i dont want the interface to rotate when the user rotate is phone.

The Intel XDK simulator doesn't have all the futures, such as Cordova plugins, if I'm not mistaken, and orientation lock. You are still able to turn it around in the emulator. But usually it works then on a real device.
B
32
S
7
G
4
Posts: 398
Reputation: 4,591

Next

Return to How do I....?

Who is online

Users browsing this forum: Elliott, kellehk, Voytek and 29 guests