Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Possible To Prevent Change From Portrait To Landscape?
Mon, Jul 3 2017 6:46 PMPermanent Link

Frederick Chin

In my application, the form has to display in portrait mode of an Android phone because in landscape, the content won't fit or be meaningful when displayed in this mode.

Is there a way in EWB to prevent the phone from displaying the form in landscape when the phone is tilted?

--
Frederick
Mon, Jul 3 2017 11:57 PMPermanent Link

Frederick Chin

I forgot to ask how to detect a change in orientation in Android? I suppose the same code will work for IOS?

--
Frederick
Tue, Jul 4 2017 2:08 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

I just detect a screen resize and test to see if the width is greater
than the height.

Chris Holland
[Team Elevate]

On 04/07/2017 04:57, Frederick Chin wrote:
> I forgot to ask how to detect a change in orientation in Android? I suppose the same code will work for IOS?
>
> --
> Frederick
>
Tue, Jul 4 2017 10:48 AMPermanent Link

Frederick Chin

Chris,

/*
I just detect a screen resize and test to see if the width is greater
than the height.
*/

That's a great idea!

Thanks.

--
Frederick
Wed, Jul 5 2017 3:00 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Frederick,

<< In my application, the form has to display in portrait mode of an Android phone because in landscape, the content won't fit or be meaningful when displayed in this mode.

Is there a way in EWB to prevent the phone from displaying the form in landscape when the phone is tilted? >>

Unfortunately, no.  There's an orientation change event that's fired by the browser, but you can't cancel it.  That, combined with the fact that this event was a little flaky in the past in terms of how/when it was fired, is why EWB doesn't surface it.

Tim Young
Elevate Software
www.elevatesoft.com
Image