Developing Stack/App with Multiple Orientation Requirements

Sannyasin Brahmanathaswami brahma at hindu.org
Sat Feb 20 14:44:02 EST 2016


Use Case:

Mobile app dev  for Phones, where

1) the main app UI and navigation and "text reading"  cards all are best done in portrait orientation

2)  some of our web sites are not responsive and
   a) look horrible if viewed in portrait oriention on a small device
   b) do render reasonably in landscape orientation.

3) we will have some (many) edutainment modules (little games, graphic novelettes) etc. that will be designed for landscape

4) Video are best viewed landscape.

Question is:

How do you lock in and preview the changes in orientation during development in the IDE?

Obviously you can set these in the Standalone settings to open in portrait but allow landscape.  so the user flips and it changes
But how do you emulate this in dev space on your PC? If

If we are going from one card that is designs for portrait orientation to a card with content that must be viewed Landscape. I want the content to go landscape so that the user has no choice, but to turn his phone sideways.

How do you handle that?  You cannot take your Cinema display and flip it like you do a small device.

Do we do something like

(I'm ignoring the math necessary to get this to stay center... but to keep it simple for discussion purposes:)

on preopencard
   set the width of this stack to of this card to 736
   set the heightof this stack to of this card to 414  # iphone 6+  # change to landscape
   set the rect of widget "webBrowser" to 0,40,736,414 # assumes the browser widget is not dynamically responsive....
end preopencard

then on returning to a portrait content card, we switch back


on preopencard
   set the width of this stack to of this card to 414
  set the height of this stack to of this card to 736
end preopencard

Is this what you all do?   I'm guessing someone has already figure out what are best practices here... can you share?

BR






More information about the use-livecode mailing list