Post
by FourthWorld » Thu Mar 31, 2016 9:20 pm
DevBoyLars, there is indeed a challenge with fullScreenMode in one of the criteria you mentioned: "no borders".
I can see using it for very specialized media presentation apps and perhaps some games, but I don't mind working a bit harder to use the full screen real estate on the user's device.
The difficulty with attempting to automate resizing isn't resolution as much as ratio. LC generally abstracts coordinates similarly to CSS, such that specific locations do no necessarily equate to physical screen pixels, in a good way. It varies by screen density, and in the cases I've tested appears well managed.
So while the trickiest aspects of handling multiple resolutions are generally automated, screen ratios are a very different matter. How do we design a single layout that's optimal for 9x16, 10x16, and 3x4? And what do we do when the user turns their device so the ratio becomes 16x9, 16x10, or 4x3?
Developers accustomed to software design on the desktop have already acquired the habit of making very few assumptions about window size. It's rare that windows are of a fixed size, and both resolutions and ratios have been greatly varied for decades.
So we write resizeStack handlers, so we can put things exactly where we want them, regardless what the user does with the window rect (or with mobile, regardless which device or orientation they may be using at the moment).
If we were to try to make a tool to automate that, personally I find my own imagination too limited to conceive of anything very useful. How would it know which objects I want to reposition, and which objects I want to resize? How do I specify that this object should be 80% of the window width, while this other one should always remain 48px, and this one over here is whatever size remains after I adjust the one next to it?
If I had a point-and-click tool to make all those settings, by the time I'm done learning it and click click click click clicking my way through telling it what I want, I'm not sure I'd save much time over the few minutes it takes to just write a resizeStack handler.
Sure, it means coding. But we're programming - what doesn't?
A few minutes coding a resizeStack handler gives complete assurance over the placement of every element in exactly the way you want it. Seems time well spent when you have requirements as specific as the ones you laid out.