Page 1 of 2

LiveCode 5.0 & Mobile Geometry

Posted: Tue Oct 11, 2011 5:40 pm
by townsend
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

Re: LiveCode 5.0 & Mobile Geometry

Posted: Tue Oct 11, 2011 7:55 pm
by townsend
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.

Re: LiveCode 5.0 & Mobile Geometry

Posted: Tue Oct 11, 2011 10:48 pm
by BarrySumpter
I'm pretty sure that project was already working that way in v4.

Nothing new or automatic.

It was all done thru Stack Resize.

Re: LiveCode 5.0 & Mobile Geometry

Posted: Wed Oct 12, 2011 1:55 am
by marksmithhfx
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

Re: LiveCode 5.0 & Mobile Geometry

Posted: Wed Oct 12, 2011 5:51 pm
by townsend
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.

Re: LiveCode 5.0 & Mobile Geometry

Posted: Wed Oct 12, 2011 9:41 pm
by BarrySumpter
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.

Re: LiveCode 5.0 & Mobile Geometry

Posted: Thu Oct 13, 2011 2:12 am
by marksmithhfx
Townsend, I'm with Barry.... Nice Find!

Re: LiveCode 5.0 & Mobile Geometry

Posted: Sat Feb 11, 2012 9:09 am
by shermanator
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?

Re: LiveCode 5.0 & Mobile Geometry

Posted: Sat Feb 11, 2012 12:21 pm
by bn
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 323 times
Kind regards

Bernd

Re: LiveCode 5.0 & Mobile Geometry

Posted: Sat Feb 11, 2012 6:00 pm
by bn
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

Re: LiveCode 5.0 & Mobile Geometry

Posted: Sun Feb 12, 2012 2:41 am
by shermanator
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?

Re: LiveCode 5.0 & Mobile Geometry

Posted: Sun Feb 12, 2012 9:59 am
by bn
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

Re: LiveCode 5.0 & Mobile Geometry

Posted: Sun Feb 12, 2012 10:29 pm
by shermanator
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

Re: LiveCode 5.0 & Mobile Geometry

Posted: Mon Feb 13, 2012 12:01 am
by bn
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 322 times
KInd regards

Bernd

Re: LiveCode 5.0 & Mobile Geometry

Posted: Mon Feb 13, 2012 1:33 am
by shermanator
thanks

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