LiveCode 5.0 & Mobile Geometry

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

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

LiveCode 5.0 & Mobile Geometry

Post by townsend » Tue Oct 11, 2011 5:40 pm

Here's a screen capture from one of the new livecode 5.0 promotional videos.
It looks as though this sample app scales to all screen resolutions.
Are Button and Field Geometry now active in Mobile environments?
129 LC5.JPG
youTube Video

I didn't see it mentioned in the Release Notes.
Version 5 Release Notes
Version 5 iOS release notes

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: LiveCode 5.0 & Mobile Geometry

Post by townsend » Tue Oct 11, 2011 7:55 pm

Found it!

video: Elanor shows example of Mobile Geometry

Not only does Geometry work,
but fonts can scale up or down,
depending on the size of the screen.

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: LiveCode 5.0 & Mobile Geometry

Post by BarrySumpter » Tue Oct 11, 2011 10:48 pm

I'm pretty sure that project was already working that way in v4.

Nothing new or automatic.

It was all done thru Stack Resize.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: LiveCode 5.0 & Mobile Geometry

Post by marksmithhfx » Wed Oct 12, 2011 1:55 am

townsend wrote:Found it!

video: Elanor shows example of Mobile Geometry

Not only does Geometry work,
but fonts can scale up or down,
depending on the size of the screen.
Hi Townsend, I would agree with Barry. I think this is just being redrawn using proportional scaling in livecode scripts, similar to what was taught in the Summer Academy. But I have a question: where or how did you find the link? I never did complete my TickedOff application and I would love to do that so I plan on revisiting these videos. It looks like they may be starting a new set built around TickedOff. Please let us know if you see more.

Thanks

-- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: LiveCode 5.0 & Mobile Geometry

Post by townsend » Wed Oct 12, 2011 5:51 pm

Mark: There have been two Summer Academy Sessions so far. Both were used as a preamble to a NEW set of course work and videos called the LiveCode Getting Started Course. It's now a six video series, almost identical to the Summer Academy, but more polished. As usual, Elanor is a great teacher. ALL beginners, and anyone needing a refresher, should spend some time with these videos.
BarrySumpter wrote:I'm pretty sure that project was already working that way in v4.
Nothing new or automatic. It was all done thru Stack Resize.
If you listen to that clip, Heather clearly says, "... and it also means that on Mobile devices, although it will always run full screen, it will fit and automatically scale to whatever size mobile device it's deployed to."

I may be wrong, but I remember, in Summer Academy we were told that the Geometry of objects did not work in mobile environments and thus we needed to code for EACH individual screen size. (!??) I thought this was a ridiculous waste of time. Here in this forum there are many long and convoluted threads describing such strategies. This is the ONE issue that caused me to put my project on hold because...

I knew Geometry would eventually be supported in Mobile deployments. I think-- I hope-- 5.0 is it.
Last edited by townsend on Wed Oct 12, 2011 10:25 pm, edited 1 time in total.

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: LiveCode 5.0 & Mobile Geometry

Post by BarrySumpter » Wed Oct 12, 2011 9:41 pm

Should have written this before:
Nice Find! and Excellent Content!

Right there with you wanting the "...fit and auto scale..." to be automatic and not code based.

Wouldn't mind revisiting those lessons as well.

The summer Academy was excellent and full of content and full of support.

Other than RunRev SEEMING to have the
"anything we can do to make LC non-MS standard" mentality.
And a few places where it SEEMED names were used to deliberately confuse the poor beginner. ME.
LOL
For me the weekly lessons were harder to keep up with than I expected.
Some of the concepts were very hard to get my head around.

It's really bugging me that I can't afford these rediculously overpriced (for me) upgrades.
If it hadn't been for the OmegaBundle I wouldn't have invested in LiveCode.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: LiveCode 5.0 & Mobile Geometry

Post by marksmithhfx » Thu Oct 13, 2011 2:12 am

Townsend, I'm with Barry.... Nice Find!
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

shermanator
Posts: 9
Joined: Fri Feb 10, 2012 3:41 am

Re: LiveCode 5.0 & Mobile Geometry

Post by shermanator » Sat Feb 11, 2012 9:09 am

How do you get the screen size to auto-scale like she demonstrates in the beginning of the video ?? I keep seeing examples of this but can't actually see how it's done. Anybody know?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: LiveCode 5.0 & Mobile Geometry

Post by bn » Sat Feb 11, 2012 12:21 pm

Hi Shermanator,

I made up a simple stack that uses the resizeStack message to rearange controls. I also let it change the textSize of a field depending on the height of field. This is just to show how it can be done. You would probably not want to change the textsize dynamically.
You can click into the list field or drag the resize handle.
The code for the resizestack command is in the card script.

Also there is a stack in Help Menu -> Example Stacks and Resources -> Mobile Examples -> Orientation Example
resizeStackStack.livecode.zip
(19.98 KiB) Downloaded 322 times
Kind regards

Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: LiveCode 5.0 & Mobile Geometry

Post by bn » Sat Feb 11, 2012 6:00 pm

Hi Shermanator,

you might also want to check out this thread:

http://forums.runrev.com/phpBB2/viewtop ... 724#p31661

Thomas McGrath has a link to a stack he made with all different layouts for different devices.

He has put that stack up on RevOnline, accessible through menu Development -> Revonline or User samples. Alternatively:
http://revonline2.runrev.com/

Kind regards

Bernd

shermanator
Posts: 9
Joined: Fri Feb 10, 2012 3:41 am

Re: LiveCode 5.0 & Mobile Geometry

Post by shermanator » Sun Feb 12, 2012 2:41 am

thanks!

.. but also isn't there a way to just resize everything on the stack , as in scale everything at once to the screen size of the device , rather than have to code the scale ratio and position of each individual object?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: LiveCode 5.0 & Mobile Geometry

Post by bn » Sun Feb 12, 2012 9:59 am

Hi Shermanator,
but also isn't there a way to just resize everything on the stack , as in scale everything at once to the screen size of the device , rather than have to code the scale ratio and position of each individual object?
I am afraid not. For most of the devices the resolution is the same, it is just the width and height that are different. This means you have different aspect ratios. So scaling up is not an option. You have to position the controls either yourself or let something like MobGui do it for you. (I don't use MobGui). But MobGui does the same as if you would code it.

In the case of the Retina Display on the iPhone the aspect ratios are the same and basically you can scale everything up. But still you would want to provide e.g. higher resolution images. The simple scaling up is what happens if you use an iPhone app on the iPad. Just every pixel is doubled. It looks horrible.

So I guess you would have to code the geometry and resolution specific features.

Kind regards

Bernd

shermanator
Posts: 9
Joined: Fri Feb 10, 2012 3:41 am

Re: LiveCode 5.0 & Mobile Geometry

Post by shermanator » Sun Feb 12, 2012 10:29 pm

does MobGUI automatically adjust the aspect ratios?

I have a Motorola Droid X2 and LG Vortex Droid. The X2 has a larger screen, the Vortex has a smaller screen... A graphic on the X2 will have the length scretched out more than it will on the vortex... So although I can position objects on the phone in relation to the screen size , it still gives me the same problem of not being able to have the app compatible with all resolutions because the aspect ratio is different on different phones. An app might look perfect on one phone, then stretched out and weird on another. Even if everything is aligned properly on the screen ... Or does MobGUI solve this issue with the ratios?


thanks

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: LiveCode 5.0 & Mobile Geometry

Post by bn » Mon Feb 13, 2012 12:01 am

Hi Shermanator,

what is the big deal calculating the aspect ratio?

You would get the screenRect and have the aspect ratio and adjust the graphics images accordingly.

I added an image to the stack I posted before and the image is resized on the fly keeping its aspect ratio.

Have a look at the card script.

Otherwise you can ask in the MobGui forum, I don't know but Android support is increasing rapidly in MobGui.
resizeStackStackII.livecode.zip
(42.95 KiB) Downloaded 321 times
KInd regards

Bernd

shermanator
Posts: 9
Joined: Fri Feb 10, 2012 3:41 am

Re: LiveCode 5.0 & Mobile Geometry

Post by shermanator » Mon Feb 13, 2012 1:33 am

thanks

is it possible to make a group ID of some sort for all images , and resize everything in that entire group at once?

Post Reply