Page 1 of 1
Android Sim Orientation Settings Not Working
Posted: Sat Jul 09, 2011 10:14 pm
by McJazz
I must have missed something. No matter what setting I make, the sim 2.3.3 or 3.1 always displays in a portrait format. Please help.
on preOpenStack
mobileSetAllowedOrientations "landscape left"
end preOpenStack
Re: Android Sim Orientation Settings Not Working
Posted: Sat Jul 09, 2011 10:34 pm
by townsend
I read somewhere that the PreOpen doesn't have the width and height set yet.
So I tried it in: on OpenStack...end OpenStack, but got a missing Handler error.
Hey-- where's all these "Mobile" commands? They're not in the dictionary.
Or is that a user written Handler?
Re: Android Sim Orientation Settings Not Working
Posted: Sun Jul 10, 2011 1:46 am
by SparkOut
At the moment all the mobile platform specific commands and functions and features are in the Android Release Notes or iOS Release Notes.
You should be able to find them under the Help menu in the IDE. (Unless you are not on a Mac in which case you won't have the iOS ones).
Re: Android Sim Orientation Settings Not Working
Posted: Sun Jul 10, 2011 9:15 pm
by jacque
McJazz wrote:I must have missed something. No matter what setting I make, the sim 2.3.3 or 3.1 always displays in a portrait format.
What version of LiveCode are you using? There was an orientation bug on Android that was fixed in 4.6.2. The release notes say it affected tablets, if you're using one of those.
Re: Android Sim Orientation Settings Not Working
Posted: Mon Jul 11, 2011 6:41 pm
by townsend
I'm using 4.6.2.
I think I've got the code right. Still-- same problem.
Code: Select all
on preOpenStack
if the environment is "mobile" then
mobileUnlockOrientation
mobileAllowedOrientations("landscape right, landscape left")
mobileLockOrientation
end if
end preOpenStack
My App is designed for landscape only orientation. At start up, the device orientation is in portrait, so my stack is appears severely clipped. Then when I press Ctl-F12 to change the device orientation of landscape, the stack orientation is locked in portrait, and still severely clipped.
I also have this code on a button.
Code: Select all
on mouseUp
put empty into field "look.here"
if the environment is "mobile" then
put mobileDeviceOrientation() into field "look.here"
end if
end mouseUp
And the result is always "Portrait", even when the device, in the Simulator, is in landscape orientation.
PS: Also, the simplest app, with a 480x320 stack, with nothing but a big Hello World label, also has the same problem. Different Simulator configurations? Tried that too.
Re: Android Sim Orientation Settings Not Working
Posted: Mon Jul 11, 2011 8:07 pm
by rearview
BTW - I am having the same issue as townsed.
No matter what I do the program is always in portrait.
I am also running 4.6.2
Thanks Shane
Re: Android Sim Orientation Settings Not Working
Posted: Mon Jul 11, 2011 8:19 pm
by townsend
Glad to hear I'm not alone on this!
I'm developing on Windows 7, with a 4.6.2 Commercial license.
Also-- tested on 4.6.1, with the same results.
Re: Android Sim Orientation Settings Not Working
Posted: Mon Jul 11, 2011 8:28 pm
by rearview
I am very new to livecode so i keep thinking that I am missing something (usually that is the case lol)
Same program works like a charm on iOS (iPad).
Also one other weird issue some of the graphics that look perfect on all other os's are blue on android.
but that is another problem.
Shane