One card for every device (size)?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

One card for every device (size)?

Post by DevBoyLars » Thu Jan 15, 2015 7:52 pm

Hi there,
if I want to build an App which should run on every iPhone and maybe iPad without geometric deformations or borders, which comes with the build in scale of LiveCode, is it the best way to set up every screen with a single card for every device in the App and check on start of the App, which device runs the App and switch over to the fitting card(s)?

If the answer is yes: Would it makes sense to put all cards per device-size in it's own stack?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: One card for every device (size)?

Post by jmburnod » Thu Jan 15, 2015 9:32 pm

Hi,

We discuss resizing group in this thread.
I think that could be a way
http://forums.livecode.com/phpBB2/viewt ... hilit=zoom
Best regards
Jean-Marc
https://alternatic.ch

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: One card for every device (size)?

Post by DevBoyLars » Thu Jan 15, 2015 9:37 pm

jmburnod wrote:Hi,

We discuss resizing group in this thread.
I think that could be a way
http://forums.livecode.com/phpBB2/viewt ... hilit=zoom
Best regards
Jean-Marc
No.. Why do you think this could help? Please read, what I wrote :-p If I just zoom in or out I could never use the more space of bigger screens for more information. I don't want one of this Kid-Dev-Apps, which just resize the screen to a bigger screen. Just imagine: iPhone screen on iPad - OMG! :D


Or maybe I'm to stupid right now to see how this could help :D

ToddFabacher
Posts: 280
Joined: Fri Jan 09, 2015 6:15 pm

Re: One card for every device (size)?

Post by ToddFabacher » Tue Jan 20, 2015 3:51 am

No, you are correct. You will need a separate stack for each form factor. There is no easy way to put it. On the web there is responsive HTML using CSS, but there is no such think in Apps. It is either stretch or as you propose - just create a different stack. I would recommend a stack for each size factor you are looking for, with the multi supporting cards in that stack. Since the size is determined by the stack, that is the way to go in my opinion.

--Todd

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: One card for every device (size)?

Post by jacque » Tue Jan 20, 2015 5:04 am

Before resolution independence, some developers were using different cards for different device sizes but now that is no longer necessary. The fullscreenMode property gives us several ways to present the same card on any device regardless of its screen dimensions. The mode you choose will depend on the contents of the card and how you want to manage the display, but fullscreenMode relieves us of the need to micro-manage every layout. That's a good thing, because it's impossible to anticipate all the screen resolutions that are and will be available, especially on Android, and fullscreenMode handles all of it for us. I've been very impressed with how it manages the game I have released in all the app stores. I was able to replace dozens and dozens of lines of resizing scripts with a one-line instruction.

If you want to present different layouts for portrait and landscape views, then you do need to do some work. You can either use a resizeStack handler to reposition objects, or you can use two different cards with the layouts already set up. Everyone has their own preference (I prefer the resizeStack handler) but either way will work and both methods can be used with fullScreenMode.

Edit: if you mean you want to add additional objects on larger screen sizes, then that would be similar to having different layouts for portrait and landscape views. In that case, I agree with Todd that keeping all the cards in a single stack is a better approach if you choose not to use a resizeStack handler.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply