[Screen Orientation Plugin] How to set the orientation for a screen?

[Screen Orientation Plugin] How to set the orientation for a screen?

  
Forge Component
(5)
Published on 2016-11-08 by OutSystems Experts
5 votes
Published on 2016-11-08 by OutSystems Experts

Hi,

I'm trying to open a screen in landscape mode. I've called the "LockOrientation" action with parameter set to "landscape" in the OnInitialize, but this doesn't work. Also in the OnReady no effect. I've put the call just before navigating to the screen, but this doesn't work either.

My question is : Where should I put the call to set a screen to landscape?

Thanks in advance,

Menno

Hi Menno,

You can put it in the OnInitialize or the OnReady (or on the OnRender but not a good idea). I was able to make it work in an Android device.

Are you getting any error in the output parameter of the LockOrientation?

Cheers,

José

Hi José,

No errors or something like that. The orientation remains the same. Just nothing happens.

I've implemented the orientation event widget you've created to react on that and change objects accoordingly. That is actually better, because now the users aren't forced to turn their devices to see it correctly.

Thanks,

Menno

Hi Menno,

Just for reference, what Android version are you using? Thanks.

Cheers,

José

Hi José.

I've tested it on a Samsung S4 with Android 5.0.1

Cheers,

Menno


Menno Hoogsteen wrote:

Hi José.

I've tested it on a Samsung S4 with Android 5.0.1

Cheers,

Menno



Hi Menno,

I'm having the same problem. Have you managed to solve it?

Thanks,

Ray



Hi Ray,

I didn't solve it, but implemented functionality to detect the change in orientation to display different information.

See this thread:
https://www.outsystems.com/forums/discussion/32749/event-to-detect-device-rotation-orientation-mobile-app/

Menno