mobile orientation

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
AstghikM
Posts: 45
Joined: Mon Sep 08, 2014 8:35 pm

mobile orientation

Post by AstghikM » Tue Nov 10, 2015 1:55 pm

Hi everyone,
I would like to know is there any way to force to change the orientation (ex. from portrait to landscape) on mobile devices without physical rotation.

Thanks :)

Astghik

pink
Posts: 274
Joined: Wed Mar 12, 2014 6:18 pm

Re: mobile orientation

Post by pink » Tue Nov 10, 2015 2:10 pm

not sure what you mean by force change, when you build you can specify which orientations are allowed

are you saying that you want to keep things a particular orientation, or that you want to actually change it live without rotating the device?
Greg (pink) Miller

MadPink, LLC
I'm Mad, Pink and Dangerous to Know

AstghikM
Posts: 45
Joined: Mon Sep 08, 2014 8:35 pm

Re: mobile orientation

Post by AstghikM » Tue Nov 10, 2015 2:15 pm

pink wrote: or that you want to actually change it live without rotating the device?
hi, thanks for reply . yes i want to change it without rotating the device.

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: mobile orientation

Post by Mikey » Tue Nov 10, 2015 2:41 pm

One way is to just throw up a card that has everything rotated sideways on it...I know it's not the ideal solution, but you could have a substack set up that way...

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: mobile orientation

Post by MaxV » Mon Nov 16, 2015 10:35 am

Did you try to change the mobileSetAllowedOrientations and then

Code: Select all

send "orientationChanged" to the current card
??
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Armenhui
Posts: 71
Joined: Fri Oct 16, 2015 12:44 pm

Re: mobile orientation

Post by Armenhui » Fri Dec 04, 2015 9:20 am

Hi all,

Thank you all for the suggested solutions. We have tried what you suggested but again have the same problem.

So let me describe the problem once again. The portrait and landscape views work perfectly on IOS devices but we have a problem on Android. The screen doesn't rotate automatically, and on some devices we need to just tilt the device but on others we have to tilt and also shake it.

Please go through this link to download samples: livecode file and .apk file which I've tested on both Android and IOS devices.

https://drive.google.com/folderview?id= ... sp=sharing

Thanks,

Armenuhi

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: mobile orientation

Post by Dixie » Fri Dec 04, 2015 11:00 am

yes i want to change it without rotating the device.
I have sat thinking about this for a while and cannot think of a scenario where I would want to do this !... To change the layout from portrait to landscape, without changing the orientation would just chop things off.. nothing would fit.. ?!*&%

Armenhui
Posts: 71
Joined: Fri Oct 16, 2015 12:44 pm

Re: mobile orientation

Post by Armenhui » Fri Dec 04, 2015 11:15 am

Dear Dixie,

On IOS the layout changes from portrait to landscape immediately so that you don't even notice it. But on Android the screen view doesn't change without shaking, we can only see half of the screen, unless we rotate the phone and shake it.

Thanks

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: mobile orientation

Post by dave.kilroy » Fri Dec 04, 2015 12:58 pm

Hi Armenhui - My most recent Android apps have all been locked to Portrait/Portrait Upside-down but I've never experienced problems with orientation change in Android in the past. Just to be sure I've done a test with LC 7.1.1(rc4) on an Android device (a Nexus 4) and orientation changed smoothly without issues - and certainly no shaking...
"...this is not the code you are looking for..."

Armenhui
Posts: 71
Joined: Fri Oct 16, 2015 12:44 pm

Re: mobile orientation

Post by Armenhui » Mon Dec 07, 2015 9:05 am

Hi dave.kilroy ,

Thank you for your reply, I tested the app with Livecode 7.1.1 on Android, Lenovo S90. It works more smoothly. there was no need to shake the phone, but again I had to tilt the phone as it didn't change the orientation automatically like it does on IOS.

Best,

Armenuhi

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”