Resize Stack -- SOLVED

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
nlexa
Posts: 26
Joined: Fri Aug 05, 2011 2:34 am
Location: New Zealand

Resize Stack -- SOLVED

Post by nlexa » Tue Oct 04, 2011 3:05 am

I was making an application for mobile devices and wrote some custom resizing functions and commands loosely based on TickedOff-stage9.
When I tested it in the android sdk emulator, it didn't look so good.
So I tried the TickedOff-stage9.livecode file to see how that coped on the emulator; It didn't look good either.
ticked off.jpg
resize issues
I was just wondering if this is kinda normal? Some teething problems? Has anyone else experienced this kind of issue?
TickedOff-stage9 works fine when resizing on desktop.
Last edited by nlexa on Thu Oct 06, 2011 12:11 am, edited 1 time in total.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7258
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Resize Stack

Post by jacque » Tue Oct 04, 2011 5:24 pm

No, not normal. The original worked, so I wonder if the resizeStack handler was changed?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Resize Stack

Post by BarrySumpter » Tue Oct 04, 2011 10:58 pm

The original Stage9 works on my 5554:Android-2p2-API-8.

hth
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.

nlexa
Posts: 26
Joined: Fri Aug 05, 2011 2:34 am
Location: New Zealand

Re: Resize Stack

Post by nlexa » Wed Oct 05, 2011 4:11 am

I worked it out!
But maybe you can explain to me why it works:
I had to "Lock size and position" for all the images.
I remember something mentioned about that in the 2011 runrev developers conference when they were doing the tutorial and the speaker was demonstrating how to resize and import images.
Why is it that images automatically resize to their original size when you revisit the card unless you specifically lock the size and position?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7258
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Resize Stack

Post by jacque » Wed Oct 05, 2011 4:42 am

It takes a lot of people by surprise, but that's how it works. Groups behave the same way. Unlocked images revert to their native dimensions and groups revert to encompass their contents if they aren't locked. If locked, both retain their set sizes.

For images, it allows you to scale an image temporarily and not worry about setting it back to its normal size when you return to the card because that will happen automatically. Another common use for the behavior is to re-use an image object repeatedly to show different photos, for example. When you put a new photo into the image object, it automatically resizes to accomodate the entire image (which is a very easy way to find out an image's dimensions too.) For groups, moving or resizing any of the contents allows the group to adapt immediately to the size of its contents which may or may not be what you need. In either case, locking the image or the group prevents resizing.

There have been discussions about which way the default should be, but it's a toss-up. Different applications require different behaviors and it usually works out that about 50% of developers want it changed.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Resize Stack

Post by BarrySumpter » Wed Oct 05, 2011 12:49 pm

Why not have an option where the developer can set the default to his preference?
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.

nlexa
Posts: 26
Joined: Fri Aug 05, 2011 2:34 am
Location: New Zealand

Re: Resize Stack

Post by nlexa » Thu Oct 06, 2011 12:04 am

thanks jacque :mrgreen:

Post Reply

Return to “Android Deployment”