Getting Orientation Enforced on Phone

Sannyasin Brahmanathaswami brahma at hindu.org
Fri Apr 13 23:38:52 EDT 2018


Monte:  "there is a God in LC Universe!"

 9.0.1  

I can live with that.. hopefully sooner than later. If you don’t there soon I will be forced to a horrible notice 

"Please turn phone"  and end of change of stacks.

Like Ralph said "using wait is madness"

(but using wait is for a different purpose. On android, acceleratedRendering, when you turn it in off in one stack and go another stack, you have to give the phone time (does not happen on iOS)  otherwise "all hell breaks loose" (snap shot of previous screen shot, different part of screen show different parts of two stack, where on earth are pixel are coming from the stack who is closed and the acceleratedRendering is false  -- is "magical"  … only by introducing wait fill work.) 

BR

    >1) mobileSetAllowedOrientations should be just that. This should be a end
    >user rotation permissions.
    
    I have had a brief look at this worked out what needs to be done. Hopefully we can do this next sprint for 9.0.1.
    
    >2) Add new==> mobileSetOrientation (pOrientation,
    >pRespectDeviceOrientationLock {true|false})
    
    I guess rather than this we could fix #1 and ensure that all platforms respect the system orientation lock unless it is not in the allowed orientations given if you are forcing an orientation you would need to fiddle with allowed orientations anyway.

  Cheers Monte

======
Yes, agreed. I can’t  think of another use case. 

•	portrait
•	portrait upside down 
•	landscape left 
•	landscape right

Or 

portrait, portrait update down
landscape right, landscape life

should lock it in not matter how the phone is physically oriented 

and if some developer wants to play with geometry, they can "fiddle" all they want with:

mobileSetOrientation portrait, portrait upside down, landscape left, landscape right

NOW than said 

go  cardOrStackObject  # a landscape stack
wait 100 milliseconds with messages

close stack oStackName # portrait stack
wait 100 milliseconds with messages

I think will cause problems, unless the user turns off mobile orientation temporarily (HA! maybe I will try it)

So… if you can get this work

go "card 5 of  stack NewStackB" in window "OldStackA"

  -- with the orientation lock enforced, that will be ideal. 

also secondarily 

I would make a global preference 

"acceleratedRendering is to false on closing off stack"

so that we don't have keep fiddling with it all the time.
It clear that it needs to turned off.

 The new stack… whether you it on or not, is up to you. 

BR


 




More information about the Use-livecode mailing list