app screen first appears upside down
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
app screen first appears upside down
My app screen first appears upside down until I rotate my tablet at least 45 degrees. Then it will correctly orientate right side up. Is there a way to have it orientate correctly (right side up) on launching without having to rotate the tablet. My code is below.
on preopencard
if environment() = "mobile" then
mobileSetAllowedOrientations("landscape left, "landscape right")
end if
end preopencard
on preopencard
if environment() = "mobile" then
mobileSetAllowedOrientations("landscape left, "landscape right")
end if
end preopencard
Re: app screen first appears upside down
I don't know, but you could try something like setting only a single allowed orientation, locking it on start up, then once the app is initialised, you could set the alternative allowed orientations again, and unlock to allow normal rotation with the alternative orientations to take effect.
?
?
Re: app screen first appears upside down
I tried your suggestion by inserting the following with no success. I hope I'm wrong but what I think is needed is a new command in livecode that checks the current tablet screen orientation (before app launch) and "sets" the livecode app to that screen orientation. As it is right now a landscape app has a 50/50 change of initially displaying upside down until the user tries rotating the tablet. I've check other apps on googleplay and they do not have this problem. If I'm wrong please let me/us know. Thanks - Joe
on preopenstack
if environment() = "mobile" then
mobileSetAllowedOrientations("landscape left")
mobileLockOrientation
end if
end preopenstack
then
on preopencard
mobileUnlockOrientation
mobileSetAllowedOrientations("landscape left, landscape right")
end if
end preopencard
on preopenstack
if environment() = "mobile" then
mobileSetAllowedOrientations("landscape left")
mobileLockOrientation
end if
end preopenstack
then
on preopencard
mobileUnlockOrientation
mobileSetAllowedOrientations("landscape left, landscape right")
end if
end preopencard
Re: app screen first appears upside down
There is the mobileOrientation() function available. I said earlier I don't know, but I think you could use this if you called it early enough, and put the unlock late enough in the processing order. You don't need to allow the orientation to change until after the first card is shown so how about:
in the stack script and in the card script.
It seems to work OK in my very cursory testing here.
Code: Select all
on preOpenStack
if the environment is "mobile" then
put mobileOrientation() into tAllowedOrientation
mobileSetAllowedOrientations tAllowedOrientation
mobileLockOrientation
end if
end preOpenStack
Code: Select all
on openCard
if the environment is "mobile" then
mobileSetAllowedOrientations "landscape left,landscape right"
mobileUnlockOrientation
end if
end openCard
It seems to work OK in my very cursory testing here.
Re: app screen first appears upside down
Unfortunately the code provided does not work. Runrev support has confirmed the issue and I have submitted a bug report.
From runrev support:
Even though you have your mobileSetAllowedOrientations set to both landscape left
and right, tho command will only be triggered the next time an orientation change
has been applied. This explains why you have to rotate the device before the correct
orientation is applied.
From runrev support:
Even though you have your mobileSetAllowedOrientations set to both landscape left
and right, tho command will only be triggered the next time an orientation change
has been applied. This explains why you have to rotate the device before the correct
orientation is applied.
Re: app screen first appears upside down
Seems not solved yet…
Re: app screen first appears upside down
Hi Juanjo,
One of our dev team is still investigating this issue. We should hopefully have a resolution shortly.
You will be able to view the Quality Control report relating to it here -
http://quality.runrev.com/show_bug.cgi?id=11146
Once any development are made regarding the issue, they will be announced on this report.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--
One of our dev team is still investigating this issue. We should hopefully have a resolution shortly.
You will be able to view the Quality Control report relating to it here -
http://quality.runrev.com/show_bug.cgi?id=11146
Once any development are made regarding the issue, they will be announced on this report.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--
Re: app screen first appears upside down
Thanks Neil!
Re: app screen first appears upside down
It's been 6 months -- "shortly" this isn't.runrevneil wrote: One of our dev team is still investigating this issue. We should hopefully have a resolution shortly.
Paul