Orientation Support Mobile

Mike Kerner MikeKerner at roadrunner.com
Sun Sep 7 23:38:43 EDT 2014


Well, for starters:
1) You can't seem to force LC to render a card in one orientation or the
other and then understand what you're forcing it to do.  There doesn't seem
to be a command to do it.  MobileSetAllowedOrientations doesn't help.  So
if you support P and L, but certain cards are one way and certain the
other, and the app opens in the one you didn't want, you have an issue.
 Let's say you do mobileSetAllowedOrientations to portrait, and you flip
the device sideways.  When you open the app, the app will render in
portrait, but it will think that its width and height are for landscape,
which makes rendering a bit challenging.
2) How do you lay out your cards for P and L?  You could have custom
properties, (do it the old MG way, before MG stopped supporting rotating),
but that creates a layout issue, in that you have to build the properties
for as many objects as you have on a card, and then deal with rearranging
the layout when the orientation changes.
3) If you try to overcome #2 with a substack for P and a substack for L,
then you have an event issue, because going from card 1 of substack P to
card 2 of substack L isn't going to send a closeCard event to card 1 of
substack P, which means that if you were using closeCard to dispose of your
native controls...you have to do something else, and the transition isn't
smooth.
4) There are issues with getting LC to render objects consistently when
switching orientations, which I would imagine is why John stopped
supporting orientation switching in MG.  Sometimes, when you rotate the
device, not everything goes where one might hope it would.  I still haven't
gotten to the bottom of that one.



On Sun, Sep 7, 2014 at 10:04 PM, Colin Holgate <coiin at verizon.net> wrote:

> I have used landscape and portrait in the same app outside of LiveCode,
> and certainly ran into issues. I think that in LiveCode you would want to
> enable all orientations, then listen for the orientationChanged message.
> Then, in theory, you could react accordingly.
>
> Can you go into more detail about issues you’ve hit?
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."



More information about the use-livecode mailing list