Instantiaing Grouped Controls - Templates - Responsive
Richard Gaskin
ambassador at fourthworld.com
Mon Jun 12 16:41:20 EDT 2017
J. Landman Gay wrote:
> On 6/12/17 1:19 PM, Richard Gaskin via use-livecode wrote:
>> > a) if a stack is 414 X 736, and opens on a device that is 414 X
>> > 736 with full screen mode set to showAll… is the resizeStack
>> > handler fired?
>>
>> Supporting your interest in avoiding theory, I'm compelled to ask:
>> what happened when you tried it?
>
> If the stack is the same size as the mobile device screen, there will
> be no resizing because the stack already fits.
>
> Maybe a better message to trap in this case would be preOpenControl or
> openControl, which is sent to a group the first time it is accessed or
> when the card opens, depending on whether it's a background or card
> group.
Yep, those are good triggers too, still allowing the group to manage its
own contents.
Orientation changes would still need resizeStack or orientationChanged
to be handled, though, which is one convenience with using resizeStack
for both.
My test devices here each have different screen dimensions, so I rarely
save my stack in the exact dimensions of the next device I'll run it on.
So I ran a test before I made that last post, in which I set my stack to
the screen dimensions of the phone nearest me, then ran it on that
phone: I got the resizeStack message anyway.
I thought I'd read a post here some time ago about this from one of the
regulars who's shipped a lot of mobile apps, how on mobile the
resizeStack message is sent when a stack is first opened in addition to
when orientation changes.
That's what got me started down this path, and it's been working so
reliably on Android that I hadn't considered perhaps I'm relying on a bug.
Either way, it would be great if the engine sent the resizeStack message
under the same circumstances on both iOS and Android.
As it appears on Android right now, even if it's an exception to
whatever rules are supposed to apply, it's a darn handy one, which was
what led me to believe it was a design decision.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list